<!DOCTYPE html>
<html>
<head>
  <title>MGED User's Manual</title>
  <style type="text/css">
  div.c1 {text-align: center}
  </style>
</head>
<body>
  <h1>Mged User's Manual</h1>
  <h1>INTRODUCTION</h1>
  <p>Computer graphics is one of the fastest growing fields in the
  computer industry. Computer graphics has applications in many
  diverse areas, from electronic games to medicine; from cartoons
  to the space industry. Just what is interactive computer graphics
  and why is it so versatile? Human visual perception is quite keen
  and communicating with a computer is generally faster and easier
  with images, rather than with numbers. Furthermore, by having the
  computer continuously updating a display, the display itself
  becomes the communications medium. The user converses with the
  computer through the display using devices such as light pens,
  mice, data tablets, buttons, and knobs. The response of the
  computer is immediately reflected on the display, providing a
  fast communication channel between person and machine. This
  technology is called interactive computer graphics.</p>
  <p>As the Army's lead laboratory for vulnerability technology,
  the Ballistic Research Laboratory (BRL) constantly performs
  analyses for a wide variety of military systems. Three
  dimensional computer models of the physical characteristics of
  these systems are vital to these studies. Since the mid-1960's,
  BRL has used a solid modeling technique called Combinatorial
  Solid Geometry (CSG or COMGEOM) for representing these models.
  The COMGEOM technique uses Boolean logic operations to combine
  basic geometric shapes or primitives to produce complex
  three-dimensional objects. The COMGEOM geometric models are
  processed by the Geometric Information For Targets (GIFT)
  <a href="#gift1,gift2">gift1,gift2</a> and LIBRT <a href=
  "#solid-models">solid-models</a> for use in follow-on engineering
  analysis.</p>
  <p>Geometric models are large collections of numerical data which
  have traditionally been created and edited manually, and analyzed
  in a batch environment. The production and modification of
  geometric models has been a slow, labor-intensive process. In
  1980, BRL initiated an effort to improve the response time of the
  geometric modeling process by applying interactive computer
  graphics techniques. As a result of this work, BRL developed the
  Multi-device Graphics EDitor (MGED), an interactive editor for
  solid models based on the COMGEOM technique. Using MGED, a
  designer can build, view, and modify model descriptions
  interactively by manipulating the graphical representation,
  receiving immediate visual feedback on a graphics display. MGED
  replaces the manual method for the production and modification of
  geometric models.</p>
  <p>Before MGED was built, existing packages were evaluated with
  respect to their utility for the geometric modeling process.
  Quite an exhaustive search of commercially available systems was
  conducted and none were found which met the BRL requirements. A
  study was initiated to examine the feasibility of producing the
  required capability in-house; a preliminary version of MGED which
  quite convincingly demonstrated the feasibility of such an
  undertaking <a href=
  "#interactive-construction">interactive-construction</a>. It was
  then decided to develop MGED into a full production code.
  Production MGED code has been used since January 1982 to build
  models interactively at BRL.</p>
  <p>This report is intended to serve as a user manual for the MGED
  program. The process of viewing and editing a description using
  MGED is covered in detail. The internal data structure is also
  covered, as it is an important part in the overall design. All
  the commands will be discussed and a command summary table
  presented. Also, a section will be devoted to the hardware
  interfaces for each major class of workstations which MGED
  supports.</p>
  <h2>Philosophy</h2>
  <p>The role of CAD models at BRL differs somewhat from that of
  CAD models being built in the automobile and aerospace
  industries, resulting in some different design choices being made
  in the BRL-CAD software. Because BRL's main use for these models
  is to conduct detailed performance and survivability analyses of
  large complex vehicles, it is required that the model of an
  entire vehicle be completely contained in a single database
  suitable for interrogation by the application codes. This places
  especially heavy demands on the database software. At the same
  time, these analysis codes require less detail than would be
  required if NC machining were the primary goal.</p>
  <p>At BRL, there are only a small number of primary designers
  responsible for the design of a vehicle, and for the construction
  of the corresponding solid model. Together they decide upon and
  construct the overall structure of the model, then they perform
  the work of building substructures in parallel, constantly
  combining intermediate results into the full model database.
  Because of the need to produce rapid prototypes (often creating a
  full design within a few weeks), there is no time for a separate
  integration stage; subsystem integration must be an ongoing part
  of the design process.</p>
  <p>Once an initial vehicle design is completed, there is usually
  the need for exploring many alternatives. Typically, between
  three and twelve variations of each design need to be produced,
  analyzed, and optimized before recommendations for the final
  design can be made. Also, there is a constantly changing
  definition of performance; new developments may necessitate
  rapidly re-evaluating all the designs of the past several years
  for trouble spots.</p>
  <p>The user interface is designed to be powerful and ``expert
  friendly'' rather than foolproof for a novice to use. However, it
  only takes about two days for new users to start doing useful
  design work with MGED. True proficiency comes with a few months
  practice.</p>
  <p>Finally, it is vitally important that the software offer the
  same capabilities and user interface across a wide variety of
  display and processor hardware. Government procurement
  regulations make single-vendor solutions difficult. The best way
  to combat this is with highly portable software.</p>
  <h2>Displays Supported</h2>
  <p>It is important for a CAD system to have a certain degree of
  independence from any single display device in order to provide
  longevity of the software and freedom from a single equipment
  supplier. The MGED editor supports serial use of multiple
  displays by way of an object-oriented programmatic interface
  between the editor proper and the display-specific code. All
  display-specific code for each type of hardware is isolated in a
  separate <i>display manager</i> module. High performance of the
  display manager was an important design goal. Existing graphics
  libraries were considered, but no well established standard
  existed with the necessary performance and 3-dimensional
  constructs. By having the display manager modules incorporated as
  a direct part of the MGED editor, the high rates of display
  update necessary to deliver true interactive response are
  possible, even when using CPUs of modest power.</p>
  <p>An arbitrary number of display managers may be included in a
  copy of MGED, allowing the user to rapidly and conveniently move
  his editing session from display to display. This is useful for
  switching between several displays, each of which may have unique
  benefits: one might have color capability, and another might have
  depth cueing. The <b>release</b> command closes out MGED's use of
  the current display, and does an implicit attach to the ``null''
  display manager. This can be useful to allow another user to
  briefly examine an image on the same display hardware without
  having to lose the state of the MGED editing session. The
  <b>attach</b> command is used to attach to a new display via its
  appropriate display manager routines. If another display is
  already attached, it is released first. The null display manager
  also allows the MGED editor to be run from a normal alphanumeric
  terminal with no graphic display at all. This can be useful when
  the only tasks at hand involve viewing or changing database
  structures, or entering or adjusting geometry parameters in
  numerical form.</p>
  <p>Creation of a new display manager module in the ``<b>C</b>''
  language <a href="#c-prog-lang">c-prog-lang</a> generally takes
  an experienced programmer from one to three days. The uniform
  interface to the display manager provides two levels of
  interactive support. The first level of display support includes
  the Tektronix 4014, 4016, and compatible displays, including the
  Teletype 5620 bit-mapped displays. However, while storage-tube
  style display devices allow MGED to deliver the correct
  functionality, they lack the rate of screen refresh needed for
  productive interaction. The second level of support, including
  real-time interaction, is provided by the Vector General 3300
  displays, the Megatek 7250 and 7255 displays, the Raster
  Technologies Model One/180 display, the Evans and Sutherland
  PS300 displays with either serial, parallel, or Ethernet
  attachment, the Sun workstations, and the Silicon Graphics IRIS
  workstation family.</p>
  <h2>Portability</h2>
  <p>Today, the half-life of computer technology is approximately
  two to three years. To realize proper longevity of the modeling
  software, it needs to be written in a portable language to allow
  the software to be moved readily from processor to processor
  without requiring the modeling software or users to change. Then,
  when it is desirable to take advantage of the constantly
  increasing processor capabilities and similarly increasing memory
  capacity by replacing the installed hardware base, there are a
  minimum of ancillary costs. Also, it may be desirable to connect
  together processors from a variety of vendors, with the workload
  judiciously allocated to the types of hardware that best support
  the requirements of each particular application program. This
  distribution of processing when coupled with the fact that users
  are spread out over multiple locations makes networking a vital
  ingredient as well.</p>
  <p>BRL's strategy for achieving this high level of portability
  was to target all the software for the UNIX operating system,
  <a href="#unix-ts-sys">unix-ts-sys</a>, with all the software
  written in the ``<b>C</b>'' programming language <a href=
  "#c-prog-lang">c-prog-lang</a>. The entire BRL-CAD Package,
  including the MGED editor is currently running on all UNIX
  machines at BRL, under several versions of the UNIX operating
  system, including Berkeley 4.3 BSD UNIX, Berkeley 4.2 BSD UNIX,
  and AT\&amp;T System V UNIX.</p>
  <p>The list of manufacturers and models of CPUs that support the
  UNIX operating system <a href=
  "#modern-tools-hi-res">modern-tools-hi-res</a> is much too
  lengthy to include here. However, BRL has experience using this
  software on DEC VAX 11/750, 11/780, 11/785 processors, Gould
  PN6000 and PN9000 processors, Alliant FX/8 and FX/80 processors
  (including systems with eight CPUs), Silicon Graphics IRIS 2400,
  2400 Turbo, 3030, 4-D, and 4-D/GT workstations, the Cray X-MP,
  the Cray-2, and the ill-fated Denelcor HEP H-1000 parallel
  supercomputer.</p>
  <h2>Object-Oriented Design</h2>
  <p>The central editor code has four sets of object-oriented
  interfaces to various subsystems, including database access,
  geometry processing, display management, and command parser/human
  interface. In each case, a common interface has been defined for
  the set of functions that implement the subsystem; multiple
  instances of these function sets can exist. The routines in each
  instance of a subsystem are completely independent of all the
  routines in other functions sets, making it easy to add new
  instances of the subsystem. A new type of primitive geometry, a
  new display manager, a new database interface, or a new command
  processor can each be added simply by writing all the routines to
  implement a new subsystem. This approach greatly simplifies
  software maintenance, and allows different groups to have
  responsibility for the creation and enhancement of features
  within each of the subsystems.</p>
  <h1>THE COMBINATORIAL GEOMETRY METHODOLOGY</h1>
  <p><a name="list-of-basic-solids" id="list-of-basic-solids">
  <h2>Background</h2></a></p>
  <p>Since the MGED system is presently based on the COMGEOM solid
  modeling technique, a brief overview of the COMGEOM technique is
  required to effectively use MGED. For more detailed information
  on the COMGEOM technique see <a href=
  "#gift1,gift2">gift1,gift2</a>.</p>
  <div class="c1">
    <table border="1">
      <tr>
        <th>Symbol</th>
        <th>Name</th>
      </tr>
      <tr>
        <td>ARS</td>
        <td>Arbitrary Triangular Surfaced Polyhedron</td>
      </tr>
      <tr>
        <td>ARB</td>
        <td>Arbitrary Convex Polyhedron</td>
      </tr>
      <tr>
        <td>ELLG</td>
        <td>General Ellipsoid</td>
      </tr>
      <tr>
        <td>POLY</td>
        <td>Polygonal Faceted Solid</td>
      </tr>
      <tr>
        <td>SPL</td>
        <td>Non-Uniform Rational B-Spline (NURB)</td>
      </tr>
      <tr>
        <td>TGC</td>
        <td>Truncated General Cone</td>
      </tr>
      <tr>
        <td>TOR</td>
        <td>Torus</td>
      </tr>
      <tr>
        <td>HALF</td>
        <td>Half Space (Plane)</td>
      </tr>
      <caption>
        Basic Solid Types
      </caption>
    </table>
  </div>
  <div class="c1">
    <p><a name="list-of-special-case-solids" id=
    "list-of-special-case-solids"></a></p>
    <table border="1">
      <tr>
        <th>Symbol</th>
        <th>Name</th>
      </tr>
      <tr>
        <td>RPP</td>
        <td>Rectangular Parallelepiped</td>
      </tr>
      <tr>
        <td>BOX</td>
        <td>Box</td>
      </tr>
      <tr>
        <td>RAW</td>
        <td>Right Angle Wedge</td>
      </tr>
      <tr>
        <td>SPH</td>
        <td>Sphere</td>
      </tr>
      <tr>
        <td>RCC</td>
        <td>Right Circular Cylinder</td>
      </tr>
      <tr>
        <td>REC</td>
        <td>Right Elliptical Cylinder</td>
      </tr>
      <tr>
        <td>TRC</td>
        <td>Truncated Right Cylinder</td>
      </tr>
      <tr>
        <td>TEC</td>
        <td>Truncated Elliptical Cylinder</td>
      </tr>
      <caption>
        Special-Case Solid Types
      </caption>
    </table>
  </div>The COMGEOM technique utilizes two basic entities - a solid
  and a region. A solid is defined as one of fifteen basic
  geometric shapes or primitives. Figure <a href=
  "#list-of-basic-solids">list-of-basic-solids</a> lists the basic
  solid types, and Figure <a href=
  "#list-of-special-case-solids">list-of-special-case-solids</a>
  lists special cases of the basic solid types for which support
  exists. The individual parameters of each solid define the
  solid's location, size, and orientation. A region is a
  combination of one or more solids and is defined as the volume
  occupied by the resulting combination of solids. Solids are
  combined into regions using any of three logic operations: union
  (OR), intersection (+), or difference (-). The union of two
  solids is defined as the volume in either of the solids. The
  difference of two solids is defined as the volume of the first
  solid minus the volume of the second solid. The intersection of
  two solids is defined as the volume common to both solids. 
  <!--  XXX Figure 1 presents a graphical representation of these operations. -->
  <p>Any number of solids may be combined to produce a region. As
  far as the COMGEOM technique is concerned, only a region can
  represent an actual component of the model. Regions are
  homogeneous; they are composed of a single material. Each region
  represents a single object in the model; the solids are only
  building blocks which are combined to define the <i>shape</i> of
  the regions. Since regions represent the components of the model,
  they are further identified by code numbers. These code numbers
  either identify the region as a model component (nonzero item
  code) or as air (nonzero air code). Any volume not defined as a
  region is assumed to be ``universal air'' and is given an air
  code of ``01''. If it is necessary to distinguish between
  universal ``01'' air and any other kind of air, then that volume
  must be defined as a region and given an air code other than
  ``01''. Normally, regions cannot occupy the same volume
  (overlap), but regions identified with air codes can overlap with
  any region identified as a component (i.e. one that has a nonzero
  item code). Regions identified with different air codes, however,
  can not overlap.</p>
  <h2>Directed Acyclic Graph and Database Details</h2>
  <p>One of the critical aspects of a graphics software package is
  its internal data structure. Since geometric models often result
  in very large volumes of data being generated, the importance of
  the data structure here is emphasized. Thus it is felt that a
  brief introduction to the organization of the MGED database is
  important for all users.</p>
  <p>The database is stored as a single, binary, direct-access UNIX
  file for efficiency and cohesion, with fixed length records
  called database <i>granules</i>. Each object occupies one or more
  granules of storage. The user sees and manipulates the directed
  acyclic graphs like UNIX paths (e.g., car/chassis/door), but in a
  global namespace. There can be many independent or
  semi-independent directed acyclic graphs within the same
  database, each defining different models. The figure also makes
  heavy use of the <i>instancing</i> capability. As mentioned
  earlier, the <i>leaves</i> of the graph are the primitive
  solids.</p>
  <p>Commands exist to import sub-trees from other databases and
  libraries, and to export sub-trees to other databases. Also,
  converters exist to dump databases in printable form for
  non-binary interchange.</p>
  <h2>Model Building Philosophy</h2>
  <p>The power of a full directed acyclic graph structure for
  representing the organization of the database gives a designer a
  great deal of flexibility in structuring a model. In order to
  prevent chaos, most designers at BRL choose to design the overall
  structure of their model in a top-down manner, selecting
  meaningful names for the major structures and sub-structures
  within the model. Actual construction of the details of the model
  generally proceeds in a bottom-up manner, where each sub-system
  is fabricated from component primitives.</p>
  <p>The first sub-systems to be constructed are the chassis and
  skin of the vehicle, after which a set of analyses are run to
  validate the geometry, checking for unintentional gaps in the
  skin or for solids which overlap. The second stage of model
  construction is to build the features of the main compartments of
  the vehicle. If necessary for the analysis codes that will be
  used, the different types of air compartments within the model
  also need to be described. The final stage of model construction
  is to build the internal objects to the desired level of detail.
  This might include modeling engines, transmissions, radios,
  people, seats, etc. In this stage of modeling, the experienced
  designer will draw heavily on the parts-bin of model components
  and on pieces extracted from earlier models, modifying those
  existing structures to meet his particular requirements.</p>
  <p>Throughout the model building process it is important for the
  model builder to choose part names carefully, as the MGED
  database currently has a global name space, with individual node
  names limited to 16 characters. In addition, BRL has defined
  conventions for naming the elements in the top three levels of
  database structure, allowing people to easily navigate within
  models prepared at different times by different designers. This
  naming convention facilitates the integration of design changes
  into existing models.</p>
  <h1>THE BASIC EDITING PROCESS</h1>
  <h2>Interaction Forms</h2>
  <p>Textual and numeric interaction with the MGED editor is the
  most precise editing paradigm because it allows exact
  manipulation of known configurations. This works well when the
  user is designing the model from an existing drawing, or when all
  dimensions are known (or are computable) in advance.</p>
  <p>The use of a tablet or mouse, knob-box or dial-box, buttons,
  and a joystick are all simultaneously supported by MGED for
  analog inputs. Direct graphic interaction via a
  ``point-push-pull'' editing paradigm tends to be better for
  prototyping, developing arbitrary geometry, and fitting together
  poorly specified configurations. Having both types of interaction
  capability available at all times allows the user to select the
  style of interaction that best meets his immediate
  requirements.</p>
  <h2>The Faceplate</h2>
  <div class="c1">
    <img src="faceplate.gif" alt="faceplate"> <b>The MGED Editor
    Faceplate.</b>
  </div>
  <div class="c1">
    <img src="buttonmenu.gif" alt="buttonmenu"> <b>The Pop-Up
    Button Menu.</b>
  </div>When the MGED program has a display device attached, it
  displays a border around the region of the screen being used
  along with some ancillary status information. Together, this
  information is termed the editor ``faceplate''. See Figure
  <a href="#faceplate">faceplate</a>. In the upper left corner of
  the display is a small enclosed area which is used to display the
  current editor state; this is discussed further in the Editor
  States section, below.
  <p>Underneath the state display is a zone in which three
  ``pop-up'' menus may appear. The top menu is termed the ``button
  menu,'' as it contains menu items which duplicate many of the
  functions assigned to the button box. Having these frequently
  used functions available on a pop-up menu can greatly decrease
  the number of times that the user needs to remove his hand from
  the pointing device (either mouse or tablet puck) to reach for
  the buttons. An example of the faceplate and first level menu is
  shown in Figure <a href="#buttonmenu">buttonmenu</a>. The second
  menu is used primarily for the various editing states, at which
  time it contains all the editing operations which are generic
  across all objects (scaling, rotation, and translation). The
  third menu contains selections for object-specific editing
  operations. The choices on these menus are detailed below.</p>
  <p>It is important to note that while some display hardware that
  MGED runs on has inherent support for pop-up menus included, MGED
  does not presently take advantage of that support, preferring to
  depend on the portable menu system within MGED instead. It is not
  clear whether the slight increase in functionality that might
  accrue from using display-specific menu capabilities would offset
  the slight nuisance of a non-uniform user interface.</p>
  <p>Running across the entire bottom of the faceplate is a thin
  rectangular display area which holds two lines of text. The first
  line always contains a numeric display of the model-space
  coordinates of the center of the view and the current size of the
  viewing cube, both in the currently selected editing units. The
  first line also contains the current rotation rates. The second
  line has several uses, depending on editor mode. Normally it
  displays the formal name of the database that is being edited,
  but in various editing states this second line will instead
  contain certain path selection information. When the
  angle/distance cursor function is activated, the second line will
  be used to display the current settings of the cursor.</p>
  <p>It is important to mention that while the database records all
  data in terms of the fixed base unit of millimeters, all numeric
  interaction between the user and the editor are in terms of
  user-selected display [or local] units. The user may select from
  millimeters, centimeters, meters, inches, and feet, and the
  currently active display units are noted in the first display
  line.</p>
  <p>The concept of the ``viewing cube'' is an important one.
  Objects drawn on the screen are clipped in X, Y, and Z, to the
  size indicated on the first status line. This feature allows
  extraneous wireframes which are positioned within view in X and
  Y, but quite far away in the Z direction to not be seen, keeping
  the display free from irrelevant objects when zooming in. Some
  display managers can selectively enable and disable Z axis
  clipping as a viewing aid.</p>
  <h2>The Screen Coordinate System</h2>
  <div class="c1">
    <img src="coord-axes.gif" alt="coord-axes"> <b>The Screen
    Coordinate System.</b>
  </div>The MGED editor uses the standard right-handed screen
  coordinate system, as shown in Figure <a href=
  "#coord-axes">coord-axes</a>. The Z axis is perpendicular to the
  screen and the positive Z direction is out of the screen. The
  directions of positive (+) and negative (-) axis rotations are
  also indicated. For these rotations, the ``Right Hand Rule''
  applies: Point the thumb of the right hand along the direction of
  +X axis and the other fingers will describe the sense of positive
  rotation.
  <h2>Changing the View</h2>
  <p>At any time in an editing session, the user may add one or
  more subtrees to the active model space. If the viewing cube is
  suitably positioned, the newly added subtrees are drawn on the
  display. (The ``reset'' function can always be activated to get
  the entire active model space into view). The normal mode of
  operation is for users to work with wireframe displays of the
  unevaluated primitive solids. These wireframes can be created
  from the database very rapidly.</p>
  <div class="c1">
    <img src="crod.gif" alt="crod"> <b>An Engine Connecting
    Rod.</b>
  </div>
  <div class="c1">
    <img src="crod-close.gif" alt="crod-close"> <b>{Close-Up
    Connecting Rod, Showing Z-clipping}.</b>
  </div>On demand, the user can request the calculation of
  approximate boundary wireframes that account for all of the
  boolean operations specified along the arcs of the directed
  acyclic graph in the database. This is a somewhat time consuming
  process, so it is not used by default, but it is quite reasonable
  to use whenever the design has reached a plateau. Note that these
  boundary wireframes are not stored in the database, and are
  generally used as a visualization aid for the designer. Figure
  <a href="#crod">crod</a> shows an engine connecting rod. On the
  left side is the wireframe of the unevaluated primitives that the
  part is modeled with, and on the right side is the approximate
  boundary wireframe that results from evaluating the boolean
  expressions.
  <p>Also, at any time the user can cause any part of the active
  model space to be dropped from view. This is most useful when
  joining two complicated subsystems together; the first would be
  called up into the active model space, manipulated until ready,
  and then the second subsystem would also be called up as well.
  When any necessary adjustments had been made, perhaps to
  eliminate overlaps or to change positioning tolerances, one of
  the subassemblies could be dropped from view, and editing could
  proceed.</p>
  <p>The position, size, and orientation of the viewing cube can be
  arbitrarily changed during an editing session. The simplest way
  to change the view is by selecting one of nine built in preset
  views, which can be accomplished by a simple keyboard command, or
  by way of a button press or first level menu selection. The view
  can be rotated and translated to any arbitrary position. The user
  is given the ability to execute a <b>save view</b> button/menu
  function that attaches the current view to a <b>restore view</b>
  button/menu function.</p>
  <p>The rate of rotation around each of the X, Y, and Z axes can
  be selected by knob, joystick, or keyboard command. Because the
  rotation is specified as a rate, the view will continue to rotate
  about the view center until the rotation rate is returned to
  zero. (A future version of MGED will permit selection of rate or
  value operation of the knobs). Similarly, the zoom rate (in or
  out) can be set by keyboard command or by rotating a control
  dial. Also, displays with three or more mouse buttons have binary
  (2x) zoom functions assigned to two of the buttons. Finally, it
  is possible to set a slew rate to translate the view center along
  any axis in the current viewing space, selectable either by
  keyboard command or control dial. In VIEW state, the main mouse
  button translates the view center; the button is defined to cause
  the indicated point to become the center of the view.</p>
  <p>The assignment of zoom and slew functions to the mouse buttons
  tends to make wandering around in a large model very
  straightforward. The user uses the binary zoom-out button to get
  an overall view, then moves the new area for inspection to the
  center of the view and uses the binary zoom-in button to obtain a
  ``close up'' view. Figure <a href="#crod-close">crod-close</a>
  shows such a close up view of the engine connecting rod. Notice
  how the wireframe is clipped in the Z viewing direction to fit
  within the viewing cube.</p>
  <h2>Model Navigation</h2>
  <p>In order to assist the user in creating and manipulating a
  complicated hierarchical model structure, there is a whole family
  of editor commands for examining and searching the database. In
  addition, on all keyboard commands, UNIX-style regular-expression
  pattern matching, such as ``*axle*'' or ``wheel[abcd]'', can be
  used. The simplest editor command (<b>t</b>) prints a table of
  contents, or directory, of the node names used in the model. If
  no parameters are specified, all names in the model are printed,
  otherwise only those specified are printed. The names of solids
  are printed unadorned, while the names of combination
  (non-terminal) nodes are printed with a slash (``/'') appended to
  them.</p>
  <p>If the user is interested in obtaining detailed information
  about the contents of a node, the list (<b>l</b>) command will
  provide it. For combination (non-terminal) nodes, the information
  about all departing arcs is printed, including the names of the
  nodes referenced, the boolean expressions being used, and an
  indication of any translations and rotations being applied. For
  leaf nodes, the primitive solid-specific ``describe yourself''
  function is invoked, which provides a formatted display of the
  parameters of that solid.</p>
  <p>The <b>tops</b> command is used to find the names of all nodes
  which are not referenced by any non-terminal nodes; such nodes
  are either unattached leaf nodes, or tree tops. To help visualize
  the tree structure of the database, the <b>tree</b> command
  exists to print an approximate representation of the database
  subtree below the named nodes. The <b>find</b> command can be
  used to find the names of all non-terminal nodes which reference
  the indicated node name(s). This can be very helpful when trying
  to decide how to modify an existing model. A related command
  (<b>paths</b>) finds the full tree path specifications which
  contain a specified graph fragment, such as ``car/axle/wheel''.
  In addition to these commands, several more commands exist to
  support specialized types of searching through the model
  database.</p>
  <h2>Editor States</h2>
  <p>The MGED editor operates in one of six states. Either of the
  two PICK states can be entered by button press, menu selection,
  or keyboard command. The selection of the desired object can be
  made either by using <i>illuminate mode</i>, or by keyboard entry
  of the name of the object.</p>
  <p>Illuminate mode is arranged such that if there are <b>n</b>
  objects visible on the screen, then the screen is divided into
  <b>n</b> horizontal bands. By moving the cursor (via mouse or
  tablet) up and down through these bands, the user will cause each
  solid in turn to be highlighted on the screen, with the solid's
  name displayed in the faceplate. The center mouse button is
  pressed when the desired solid is located, causing a transition
  to the next state (Object Path, or Solid Edit).</p>
  <p>Illuminate mode offers significant advantages over more
  conventional pointing methods when the desired object lies in a
  densely populated region of the screen. In such cases, pointing
  methods have a high chance of making an incorrect selection.
  However, in sparsely populated regions of the screen, a pointing
  paradigm would be more convenient, and future versions of MGED
  will support this.</p>
  <h2>Model Units</h2>
  <p>All databases start with an ``ident'' record which contains a
  title string that identifies the model, the current local units
  (e.g., mm, cm or inches) of the model, and a database version
  identification number. As noted, all numerical information in the
  database is stored in the fixed base unit of millimeters, and all
  work (input and output) is done in a user-selected local unit.
  The user can change his local unit at any time by using the
  <b>units</b> command. This way of handling units was selected to
  free the user from worrying about units conversion when
  components are drawn from the ``parts bin''.</p>
  <h1>PERIPHERAL DEVICES</h1>
  <p>Before we discuss the features of MGED, we will introduce the
  hardware devices used to implement them. These devices are the
  ``tools of the trade'' for the MGED user. We will discuss only
  basic operational characteristics here. Specific use of these
  devices will be covered in the later sections on the viewing and
  editing features of MGED.</p>
  <h2>Joystick</h2>
  <p>The joystick is a mechanical device used to do rotations in
  MGED. Any movement left or right rotates the display about the
  X-axis. Any movement up or down rotates the display about the
  Y-axis. When the joystick top is twisted in a clockwise or
  counterclockwise direction, the display rotates about the Z-axis.
  Any combination motion of the joystick will produce a
  ``combined'' rotation about the appropriate axes. As implemented
  on the Vector General hardware, all of these motions have a
  spring return to a null center position.</p>
  <h2>Button Box</h2>
  <p>The button box contains a collection of buttons. On each
  button is a light that can be lit under program control. Pressing
  a button sends a ``press'' event to MGED, and results in an
  action occurring, or a condition being set. The exact functions
  assigned to these buttons will be discussed in the sections on
  viewing the display and on editing.</p>
  <h3>Vector General Buttons</h3>
  <p>\PostScriptPicture 6in by 5.6in, fig-vg-buttons.ps, Vector
  General Button Assignments, vg-buttons. \PostScriptPicture 4.5in
  by 3.25in, fig-sgi-buttons.ps, Silicon Graphics Button
  Assignments, sgi-buttons. 
  <!--  \gluein 4.5in by 4.5in, Vector General Button Assignments, vg-buttons. -->
  <!--  XXX \gluein 4.5in by 4in, Megatek Dial and Button Box, mg-buttons. -->
  The Vector General has thirty-two buttons. Figure <a href=
  "#vg-buttons">vg-buttons</a> depicts the functions programmed for
  each button. The buttons in the shaded area are used for editing
  while the rest are used for viewing the display.</p>
  <h3>Megatek Buttons</h3>
  <div class="c1">
    Button & Function 1 & View Mode: Restores View & Edit Mode:
    Translation in the Object-Edit mode 2 & View Mode: Saves View &
    Edit Mode: Translation in the Object-Edit mode 3 & Edit Mode:
    Saves the model being displayed on the screen 4 & Off: Viewing
    mode & On: Edit mode 5 & View Mode: Resets View & Edit Mode:
    Scaling in the Object-Edit mode 6 & Edit Mode: Rotation in the
    Object-Edit mode 7 & View Mode: Angle/Distance Cursor & Edit
    Mode: Translation in the Object-Edit mode 8 & Edit Mode:
    Rejects display and returns to Viewing display 9 & View Mode:
    Bottom View & Edit Mode: Scaling in the Solid-Edit mode 10 &
    View Mode: Left View & Edit Mode: Rotation in the Solid-Edit
    mode 11 & View Mode: Rear View & Edit Mode: Translation in the
    Solid-Edit mode 12 & View Mode: 90, 90 View & Edit Mode:
    Restores Edit mode menu 13 & View Mode: Top View & Edit Mode:
    Transfers from Viewing to Solid Pick 14 & View Mode: Right View
    & Edit Mode: Transfers from Viewing to Object Pick 15 & View
    Mode: Front View 16 & View Mode: 35/45 View
    <p><a name="mg-button-table" id="mg-button-table"></a></p>
    <table border="1">
      <caption>
        Megatek Buttons
      </caption>
    </table>
  </div>
  <p>The Megatek button box is a general purpose input/output
  device that communicates with MGED through an intelligent control
  unit. The device has eight rotatable knobs and 16 buttons with
  lights. 
  <!--  XXX See Figure <a href="#mg-buttons">mg-buttons</a>. -->
  The ``buttons'' and ``knobs'' of the Megateks are located in the
  same box. There are not enough buttons to have just one assigned
  meaning, hence most buttons have dual functions. To toggle the
  functions of the buttons, use the upper right button (toggle
  button). When the light on this button is ON, the functions
  listed on the RIGHT above each button is the current function.
  When the light on the ``toggle'' button is OFF, the functions
  labeled on the LEFT are then in effect. The left/right meaning of
  these buttons is grouped generally according to viewing functions
  on the left and editing functions on the right.</p>
  <p>Figure <a href="#mg-button-table">mg-button-table</a>
  summarizes the uses of the buttons. Depressing the button
  switches the light on and off. Many of these serve a dual role
  depending upon the selected mode - viewing or editing. The mode
  is selected by depressing button 4. If light 4 is off, the system
  is performing in the viewing mode, and the commands shown in the
  top half of the table are executed. If light 4 is on, the system
  is performing in the edit mode, and the commands shown in the
  bottom half are executed.</p>
  <h3>Silicon Graphics Buttons</h3>
  <p>The button box layout for the SGI Iris is given in Figure
  <a href="#sgi-buttons">sgi-buttons</a>. Note that the ``right''
  button shows you the right side of the model, as if you were
  looking in from the left. To achieve the customary draftsman
  views, this function goes on the left.</p>
  <p>The upper left button is the <b>help</b> key. If this button
  is held down, and any other button (or knob) is activated, a
  descriptive string is displayed in the eight character LED
  display on the button box. The upper right button is used to
  reset all the knobs to zero. This is useful to halt a runaway
  rotation or zoom operation.</p>
  <div class="c1">
    <a name="sgi-buttons" id="sgi-buttons"></a>
    <table border="1">
      <tr>
        <td align="center"></td>
        <td align="center">Help</td>
        <td align="center">ADC</td>
        <td align="center">Reset</td>
        <td align="center">Zero<br>
        Knobs</td>
        <td align="center"></td>
      </tr>
      <tr>
        <td align="center">Obj<br>
        Scale</td>
        <td align="center">Obj<br>
        ScaleX</td>
        <td align="center">Obj<br>
        ScaleY</td>
        <td align="center">Obj<br>
        ScaleZ</td>
        <td align="center">-</td>
        <td align="center">Save<br>
        View</td>
      </tr>
      <tr>
        <td align="center">Obj<br>
        TransX</td>
        <td align="center">Obj<br>
        TransY</td>
        <td align="center">Obj<br>
        TransZ</td>
        <td align="center">Obj<br>
        Rotate</td>
        <td align="center">-</td>
        <td align="center">Restore<br>
        View</td>
      </tr>
      <tr>
        <td align="center">Solid<br>
        Trans</td>
        <td align="center">Solid<br>
        Rot</td>
        <td align="center">Solid<br>
        Scale</td>
        <td align="center">Solid<br>
        Menu</td>
        <td align="center">Obj<br>
        Pick</td>
        <td align="center">Solid<br>
        Pick</td>
      </tr>
      <tr>
        <td align="center">Reject</td>
        <td align="center">Bottom</td>
        <td align="center">Top</td>
        <td align="center">Rear</td>
        <td align="center">az=45<br>
        el=45</td>
        <td align="center">Accept</td>
      </tr>
      <tr>
        <td align="center"></td>
        <td align="center">Right</td>
        <td align="center">Front</td>
        <td align="center">Left</td>
        <td align="center">az=35<br>
        el=25</td>
        <td align="center"></td>
      </tr>
      <caption>
        Silicon Graphics Button Layout
      </caption>
    </table>
  </div>
  <h2>Knobs (Dials)</h2>
  <p>The knobs (or control dials) are used to send digital
  information to the computer. As a knob is turned, a succession of
  numbers are available for use by the computer. The knobs can be
  used to rotate a displayed object about the x, y, or z axis,
  translate the object along the x or y axis, and change the size
  of the view. Action performed by these knobs is continuous and is
  initiated by turning the knob in the proper direction and
  terminated by turning the knob in the opposite direction.</p>
  <h3>Vector General Knobs</h3>
  <p>\PostScriptPicture 4.5in by 2.8in, fig-vg-knobs.ps, Vector
  General Knob Assignments, vg-knobs. \PostScriptPicture 4.5in by
  3.25in, fig-sgi-knobs.ps, Silicon Graphics Knob Assignments,
  sgi-knobs. 
  <!--  \gluein 4.5in by 3.5in, Vector General Knobs, vg-knobs. -->
  <!--  \gluein 4.5in by 3.5in, Silicon Graphics Knobs, sgi-knobs. -->
  Figure <a href="#vg-knobs">vg-knobs</a> depicts the functions
  assigned to each of the ten knobs. The exact functions of each of
  these knobs will be discussed in the angle distance cursor
  section and in the viewing features section.</p>
  <h3>Megatek Knobs</h3>
  <p>The ``buttons'' and ``knobs'' of the Megateks are located in
  the same box. 
  <!--  XXX as shown in Figure <a href="#mg-buttons">mg-buttons</a>. -->
  There are not enough knobs to have ONE assigned meaning, hence
  three knobs have dual functions. The second function of the first
  three knobs is only in effect when the angle-distance cursor
  (ADC) is on the screen.</p>
  <h3>Silicon Graphics Knobs</h3>
  <p>Figure <a href="#sgi-knobs">sgi-knobs</a> depicts the
  functions assigned to the eight knobs on the Silicon Graphics
  knob box. In normal operation, the left knobs provide rotations,
  and the right knobs provide translations and zooming. When the
  angle/distance cursor is activated, some of the knobs are
  redefined.</p>
  <h2>Mouse or Data Tablet</h2>
  <p>Moving the mouse or the data tablet ``pen'' causes a cursor on
  the screen to move. The screen X-Y coordinates of the cursor can
  be sensed by MGED at any time. Clicking one of the mouse buttons,
  or depressing the tip of the pen, results in MGED receiving a
  special event notification. The meaning of this mouse event
  depends on the current editing mode and which portion of the
  display faceplate that the cursor is located in.</p>
  <p>Below is a list of some of the functions the mouse is used for
  in MGED;</p>
  <ul>
    <li>Selecting editing menus, edit functions (move faces, move
    edges etc.) and viewing functions (selected from main edit
    menu); move pointer to appropriate edit function and press
    center mouse button.</li>
    <li>Pointing functions; interactively positioning solid
    primitive relative to other solids with positioning or size
    update being displayed at the same time, position pointer where
    required and click center mouse button.</li>
    <li>Scaling of view size; enlarge or reduce for a more detailed
    view of object, left button shrinks view size, right button
    enlarges view size.</li>
    <li>During the solid or object illuminate phase of editing, the
    screen is divided into invisible horizontal sections. The
    available selections are scanned by moving the mouse up and
    down.</li>
    <li>When MGED is is the viewing state, and a mouse event is
    received which is not in the menu area of the faceplate, the
    point at which the cursor is pointing at will be translated to
    become the center of the current view. By pointing and clicking
    the center mouse button, the center of the viewing cube can be
    moved to allow close-up viewing of different areas in your
    model.</li>
  </ul>
  <h3>Vector General Data Tablet</h3>
  <p>Position information is entered using a pen-like stylus. The
  distance this pen is from the tablet is important. If the pen tip
  is within one half inch of the tablet surface, the cursor
  location on the screen corresponds to the X,Y location of the pen
  on the tablet. This condition is called the ``near'' position. If
  the pen is more than one half inch from the tablet surface, the
  cursor remains located in the center of the screen. When the pen
  is pressed against the tablet surface, the pressure switch is
  activated and a ``mouse'' event is sent to MGED.</p>
  <h3>Megatek Data Tablet</h3>
  <p>Some Megatek systems enter position data on the data tablet
  using a pen-like stylus. If the tip of the stylus is within
  one-half inch of the surface of the tablet, a ``star''
  corresponding to this location is displayed on the display
  screen. If the tip is moved more than one-half inch from the
  surface, the position of the star remains fixed. When the stylus
  is pressed against the tablet surface, the pressure switch is
  activated and a ``mouse'' event is sent MGED.</p>
  <p>Other Megatek data tablets have a mouse instead of a pen. This
  mouse has four buttons on it. The yellow (top) button is used
  during illumination and editing just as the pen on the Vector
  General terminals. However, in the viewing mode, when pushed, the
  point which it was pointing at will be drawn at the center of the
  screen. The blue (bottom) button has this same function at ALL
  times and is used to ``slew'' the display during editing. The
  white (left) and the green (right) buttons on the mouse are used
  for zooming the display at a fixed rate. The white button will
  zoom out and the green button will zoom in.</p>
  <h3>Silicon Graphics Mouse</h3>
  <p>The left and right mouse buttons are used for binary (2x)
  zooming, and the center mouse button is used for all other MGED
  mouse functions.</p>
  <p>On the Silicon Graphics 3-D workstations, MGED can be run
  directly, or it can be run under the window manager MEX. In both
  cases, MGED opens two windows, one outlined in white for all text
  interaction, and one outlined in yellow for all graphics display.
  When running MGED directly (without MEX), all mouse events are
  sent the MGED, regardless of where the mouse is pointing. In
  order to shift emphasis between the graphics and text windows,
  the smaller one can be enlarged by pointing the cursor within the
  boundaries of the smaller window, and pressing the center button.
  This enlarges that window, and reduces the size of the other
  window.</p>
  <p>When MEX is running, it is necessary to follow the MEX
  convention of moving the cursor into the desired window, and
  clicking the right mouse button, to ``attach'' all input to that
  window. This has the unfortunate consequence of requiring a lot
  of extra mouse clicking, because the graphics window needs to be
  attached when using the buttons, knobs, and mouse, while the text
  window needs to be attached in order to enter keyboard
  commands.</p>
  <p>On the Silicon Graphics 4-D workstations running 4Sight, mouse
  events are sent to MGED only when the cursor is within the
  boundaries of the MGED graphics window.</p>
  <h3>Sun Workstation Mouse</h3>
  <p>On the Sun workstation, MGED must be run in a <b>suntools</b>
  window. The main consequence of this is that mouse events are
  sent to MGED only when the cursor is within the boundaries of the
  MGED graphics window on the screen. The left and right mouse
  buttons are used for binary (2x) zooming, and the center mouse
  button is used for all other MGED mouse functions.</p>
  <h2>Keyboard</h2>
  <p>The keyboard is used to issue commands and supply parameters
  to MGED. It is also used to login and logout of the UNIX system,
  and to run other UNIX programs. All characters typed on the
  keyboard, with the exception of the user's password, are
  displayed (echoed) on the monitor. In this text, all input typed
  by the user is shown in <i>italics</i>, while all literal MGED
  output is shown in {\tt typewriter font}. All entries are
  terminated by depressing the RETURN key. This action immediately
  precedes the execution of the directive. In most cases, lower
  case letters must be used. A space must be used between the
  command and its arguments. Embedded blanks are not allowed.
  Entering Control/H causes cursor to backspace and erase entered
  information. An MGED command is interrupted by entering
  Control/C. End-of-File is sent to MGED by entering Control/D. The
  graphics editor displays the prompt</p>
  <pre>
        mged&gt;
</pre>on the display whenever it is ready to accept a command from
the keyboard.
  <h1>OPERATING INSTRUCTIONS</h1>
  <h2>Entering the Graphics Editor</h2>
  <p>Type <i>mged filename</i>, e.g.:</p>
  <pre>
     mged s_axle.g
     mged shaft.g
     mged fred.g
</pre>where the filename is the name of the UNIX file in which your
object description data is stored. It is conventional that the
extension ``.g'' on the filename signifies a graphics file, and is
a good practice, but is not required. If the named database does
not already exist, MGED will ask if it should create a new
database. MGED will ask:
  <p>{\tt \begin{verse} \% <i>mged new.g</i> BRL-CAD Release 3.0
  Graphics Editor (MGED) \ \ \ \ Tue Sep 6 02:52:55 EDT 1988 \ \ \
  \ mike@video:/cad/mged.4d new.g: No such file or directory Create
  new database (y|n)[n]? <i>y</i> attach
  (nu|tek|tek4109|ps|plot|sgi)[nu]? <i>sgi</i> ATTACHING sgi (SGI
  4d) Untitled MGED Database (units=mm) mged&gt; \end{verse} }
  Here, the <i>italic</i> type indicates the user's response:
  <i>y</i> instructs MGED to create the new database, and
  <i>sgi</i> instructs MGED to attach to a window on the Silicon
  Graphics (SGI) workstation.</p>
  <p>Directives to the graphics editor are made by</p>
  <ol>
    <li>entering information from the keyboard, shown here in the
    text by the use of <i>italics</i>,</li>
    <li>using the stylus to select items from the menu (select),
    and</li>
    <li>pressing buttons and twisting knobs on the function control
    box (press, twist).</li>
  </ol>
  <p>The prompt for a command is {\tt mged&gt;}.</p>
  <h3>Running MGED on a Silicon Graphics</h3>
  <p>When running MGED from the console of a Silicon Graphics
  workstation, MGED retains the text window from which it was
  started, and opens a second window for the graphics display. By
  default, the graphics window is quite large, and the text window
  is rather small.</p>
  <p>On the SGI 3-d workstations, should you wish to have a large
  text window to scan printed output, move the mouse pointer into
  the text window and click the center mouse button. Use the
  reverse procedure to regain a large graphics window, i.e., move
  the mouse pointer into the graphics window and click the center
  mouse button.</p>
  <h3>Running MGED on a Tektronix</h3>
  <p>To run MGED on the tek4014 class of terminals one needs to
  have TWO terminals - the graphics terminal (4014 or one which
  emulates a 4014) and another terminal to enter commands on.</p>
  <p>The procedure is as follows:</p>
  <ol>
    <li>login on the graphics terminal</li>
    <li>enter <i>tty</i> to find out which terminal number has been
    assigned</li>
    <li>enter <i>sleep 32000</i> to put the graphics terminal in
    sleep mode</li>
    <li>login on the other terminal</li>
    <li>enter <i>mged file</i> to execute MGED</li>
    <li>enter <i>tek</i> to select the tek4014 device
    processor</li>
    <li>enter the tty value found in step 2.</li>
    <li>perform editing</li>
    <li>enter <i>q</i> to quit MGED</li>
    <li>enter control-c on the graphics terminal to end the sleep
    mode</li>
    <li>logout on both terminals</li>
  </ol>
  <p>Since there are no knobs or buttons on the tek4014 class of
  terminals, one is forced to use the <i>press</i> and <i>knob</i>
  commands to emulate these peripherals. Other commands which
  can/should be used are:</p>
  <p>ill & put up a desired path center & slew the display size &
  zoom the display sed & solid edit immediately</p>
  <p>The main force behind the writing of a driver for the tek4014
  terminals was to allow the use of the Teletype 5620 terminals.
  These graphic terminals have an internal processor and different
  windows can be set up which represent different terminals. Hence
  two terminals are NOT necessary. The use of the Teletype 5620
  terminals is then the same as the procedure outlined above,
  except each window represents a terminal.</p>
  <h2>The Pop-Up Button Menu</h2>
  <p>The default MGED faceplate is shown in Figure <a href=
  "#faceplate">faceplate</a>. If the BUTTON MENU area on the screen
  is selected with the mouse, then the pop-up button menu appears,
  as shown in Figure <a href="#buttonmenu">buttonmenu</a>. This
  menu can be very useful in reducing the amount of hand motion
  between the mouse and the button box.</p>
  <h2>Starting Your Model</h2>
  <p>Modeling practices using MGED can be quite individual. The
  following is a suggested modeling method to start with; you may
  end up developing your own style as you become more familiar with
  MGED.</p>
  <p>First of all, decide how you want to represent your model,
  including the amount of detail, types of solids and regions
  necessary. Have an accurate sketch or engineering drawing
  available, so that you can easily transfer its information into
  the types of primitive solids necessary to create your model.
  Where possible it is recommended to start with a large block
  solid and ``subtract'' pieces from it. In this way you avoid
  errors with abutting faces of a collection of solids ``unioned''
  together.</p>
  <p>Next the solids are created using the <i>make</i>, <i>cp</i>,
  <i>mirror</i> or <i>in</i> commands. Depending on the complexity
  of the model, the solids may be created in the desired location
  or created at the origin and later translated to the desired
  location. Creation at the origin provides an opportunity to take
  advantage of possible symmetries in the geometry. Once all the
  solids are finished it is time to create the region[s], which
  will describe (to MGED) how to combine the solids to represent
  the model.</p>
  <p>The region[s] are then given the desired item/air code (if
  this is necessary, otherwise leave it as the system default
  value), and material codes. The regions are then put onto a
  group, usually for functionality only. A group has no operations
  as such (like union [u], intersection [+] or difference [-]) and
  is just a collection of objects for convenient naming of a whole
  screen or collection of objects.</p>
  <h1>CREATING NEW OBJECTS</h1>
  <h2>Creating New Leaves (Solids/Primitives)</h2>
  <p>A family of commands exists to allow the user to add more
  actual solids (leaf nodes) to the model database. To obtain a
  precise duplicate of an existing solid (presumably to be changed
  by a subsequent editing command), the copy (<i>cp</i>) command
  can be used. It is important to note that the copy operation is
  different from creating an <i>instance</i> of an existing solid;
  there are occasions to use both operations. If the precise
  configuration of the solid desired is not important, the
  <i>make</i> command can be used to create a stock prototype solid
  of the desired type with the given name, which can then be edited
  to suit. The <i>mirror</i> command makes a duplicate of an
  existing solid reflected about one of the coordinate axes.</p>
  <p>If the actual numeric parameters of a solid are known, then
  the <i>in</i> command can be used. In addition to prompting for
  the descriptions of the full generic primitive solids, this
  command also accepts abbreviated input formats. For example, a
  wedge or an RPP can be entered with a minimum of parameters, even
  though a database ARB8 is created. Similarly, the parameters for
  a right circular cylinder can be given, resulting in a truncated
  general cone (TGC) being stored. This is not a very sophisticated
  way to build solids, but it receives a surprising amount of
  use.</p>
  <p>A number of commands also exist to create new solids with some
  higher level description. For example, the <i>inside</i> command
  creates a new solid inside an existing solid, separated from the
  existing solid by specified tolerances. This is quite useful for
  creating hollow objects such as fuel tanks. It is possible to
  create a plate with a specified azimuthal orientation and
  fallback angle, or to create an ARB8 (plate) by specifying three
  points and a thickness, or to create an ARB8 given one point, an
  azimuthal orientation, and a fallback angle.</p>
  <h2>Specific Cases</h2>
  <p>After having started MGED and created a new database, the next
  step is to use the <i>units</i> command to tell the system that
  you will be entering values in mm, cm, m, in or ft. For our
  example we will work in mm:</p>
  <pre>
     units mm
</pre>
  <p>Now you may give your database a title using the <i>title</i>
  command as in:</p>
  <pre>
     title Mechanical Bracket
</pre>
  <p>This title (``Mechanical Bracket'') now appears at bottom left
  hand corner of graphics window. Further examples:</p>
  <pre>
     title six wheeled tank
     title stub axle
</pre>
  <p>At this point you can start creating your solid objects using
  the ``arbs'', ``sph'', ``tor'', <i>etc.</i>, arguments to the
  <i>make</i> or <i>in</i> command. The <i>make</i> command gives
  you a solid to a default size, you then have to use the solid
  edit mode to interactively edit the solid to the desired size.
  <i>make</i> command is entered as below: Examples:</p>
  <pre>
make box arb8
make cyl rcc
make ball sph
</pre>The first argument is the solid name, and the second argument
is the primitive type.
  <p>The <i>in</i> command expects you to key in a set of
  parameters to describe your solid; the parameters can be the x y
  and z of a vertex (such as the corner of an ARP8), or the x y and
  z of a vector (such as the height or H vector of a BOX) or the
  radius (such as for a torus). Below is a list of primitives with
  their <i>in</i> commands as requested by MGED and sample input.
  Reading an <i>in</i> file into a MGED data file will be discussed
  later. Note how providing incomplete input to the <i>in</i>
  command will result in MGED repeating the prompt for the missing
  information.</p>
  <div class="c1">
    <img src="ex.rpp.gif" alt="ex.rpp"> <b>Example RPP.</b>
  </div>
  <h3>RPP (rectangular parallelepiped)</h3>
  <p>{\tt mged&gt; <i>in name rpp</i> Enter XMIN, XMAX, YMIN, YMAX,
  ZMIN, ZMAX: <i>0 25</i> Enter YMIN, YMAX, ZMIN, ZMAX: <i>0 50</i>
  Enter ZMIN, ZMAX: <i>0 100</i> }</p>
  <p>This sequence produces the RPP shown in Figure <a href=
  "#ex.rpp">ex.rpp</a>.</p>
  <div class="c1">
    <img src="ex.box.gif" alt="ex.box"> <b>Example BOX.</b>
  </div>
  <h3>BOX (BOX)</h3>
  <p>{\tt mged&gt; <i>in my box</i> Enter X, Y, Z of vertex: <i>0 0
  0</i> Enter X, Y, Z of vector H: <i>25 0 0</i> Enter X, Y, Z of
  vector W: <i>0 50 0</i> Enter X, Y, Z of vector D: <i>0 0 100</i>
  } This sequence produces the BOX shown in Figure <a href=
  "#ex.box">ex.box</a>.</p>
  <div class="c1">
    <img src="ex.arb8.gif" alt="ex.arb8"> <b>Example ARB8.</b>
  </div>
  <h3>ARB8: Arbitrary Convex Polyhedron, 8 Vertices</h3>
  <p>{\tt mged&gt; <i>in poly arb8</i> Enter X, Y, Z for point 1:
  <i>0 0 0</i> Enter X, Y, Z for point 2: <i>0 150 0</i> Enter X,
  Y, Z for point 3: <i>0 150 200</i> Enter X, Y, Z for point 4:
  <i>0 0 200</i> Enter X, Y, Z for point 5: <i>75 0 0</i> Enter X,
  Y, Z for point 6: <i>75 150 0</i> Enter X, Y, Z for point 7:
  <i>75 150 200</i> Enter X, Y, Z for point 8: <i>75 0 200</i> }
  This sequence produces the ARB8 shown in Figure <a href=
  "#ex.arb8">ex.arb8</a>.</p>
  <div class="c1">
    <img src="ex.arb4.gif" alt="ex.arb4"> <b>Example ARB4.</b>
  </div>
  <h3>ARB4: Arbitrary Convex Polyhedron, 4 vertices</h3>
  <p>{\tt mged&gt; <i>in a4 arb4</i> Enter X, Y, Z for point 1:
  <i>0 0 0</i> Enter X, Y, Z for point 2: <i>10 60 0</i> Enter X,
  Y, Z for point 3: <i>40 20 0</i> Enter X, Y, Z for point 4: <i>20
  15 70</i> } This sequence produces the ARB4 shown in Figure
  <a href="#ex.arb4">ex.arb4</a>.</p>
  <div class="c1">
    <img src="ex.rcc.gif" alt="ex.rcc"> <b>Example Right Circular
    Cylinder.</b>
  </div>
  <h3>RCC (Right Circular Cylinder)</h3>
  <p>{\tt mged&gt; <i>in rcyl rcc</i> Enter X, Y, Z of vertex: <i>0
  0 0</i> Enter X, Y, Z of height (H) vector: <i>0 0 60</i> Enter
  radius: <i>15</i> } This sequence produces the RCC shown in
  Figure <a href="#ex.rcc">ex.rcc</a>. Note that in this case, the
  A,B,C, and D vectors have magnitude which equal the radius,
  15.</p>
  <div class="c1">
    <img src="ex.trc.gif" alt="ex.trc"> <b>Example Truncated Right
    Cylinder.</b>
  </div>
  <h3>TRC (Truncated Right Cylinder)</h3>
  <p>{\tt mged&gt; <i>in trcyl trc</i> Enter X, Y, Z of vertex:
  <i>0 0 0</i> Enter X, Y, Z of height (H) vector: <i>40 0 0</i>
  Enter radius of base: <i>20</i> Enter radius of top: <i>10</i> }
  This sequence produces the TRC shown in Figure <a href=
  "#ex.trc">ex.trc</a>. Note that the magnitude of A and B equal
  the base radius, 20,</p>
  <div class="c1">
    <img src="ex.raw.gif" alt="ex.raw"> <b>Example Right Angle
    Wedge.</b>
  </div>
  <h3>RAW (Right Angle Wedge)</h3>
  <p>{\tt mged&gt; <i>in weg raw</i> Enter X, Y, Z of vertex: <i>0
  0 0</i> Enter X, Y, Z of vector H: <i>40 0 0</i> Enter X, Y, Z of
  vector W: <i>0 70 0</i> Enter X, Y, Z of vector D: <i>0 0 100</i>
  } This sequence produces the RAW shown in Figure <a href=
  "#ex.raw">ex.raw</a>.</p>
  <div class="c1">
    <img src="ex.sph.gif" alt="ex.sph"> <b>Example Sphere.</b>
  </div>
  <h3>SPH (Sphere)</h3>
  <p>{\tt mged&gt; <i>in ball sph</i> Enter X, Y, Z of vertex: <i>0
  0 0</i> Enter radius: <i>50</i> } This sequence produces the
  sphere shown in Figure <a href="#ex.sph">ex.sph</a>. Note that
  the A, B, and C vectors all have magnitude equal to the radius,
  50.</p>
  <div class="c1">
    <img src="ex.ellg.gif" alt="ex.ellg"> <b>Example General
    Ellipsoid.</b>
  </div>
  <h3>ELLG (General Ellipsoid)</h3>
  <p>{\tt mged&gt; <i>in egg ellg</i> Enter X, Y, Z of vertex: <i>0
  0 0</i> Enter X, Y, Z of vector A: <i>20 0 0</i> Enter X, Y, Z of
  vector B: <i>0 60 0</i> Enter X, Y, Z of vector C: <i>0 0 40</i>
  } This sequence produces the ellipsoid shown in Figure <a href=
  "#ex.ellg">ex.ellg</a>.</p>
  <div class="c1">
    <img src="ex.tor.gif" alt="ex.tor"> <b>Example Torus.</b>
  </div>
  <h3>TOR (Torus)</h3>
  <p>{\tt mged&gt; <i>in tube tor</i> Enter X, Y, Z of vertex: <i>0
  0 0</i> Enter X, Y, Z of normal vector: <i>0 0 50</i> Enter
  radius 1: <i>20</i> Enter radius 2: <i>10</i> } This sequence
  produces the torus shown in Figure <a href=
  "#ex.tor">ex.tor</a>.</p>
  <h2>Creating New Combinations</h2>
  <p>Non-terminal nodes in the directed acyclic graph stored in the
  database are also called <i>combinations</i>. It is possible to
  extend the definition of a non-terminal node by adding an
  instance of an existing node to the non-terminal node with an
  associated boolean operation of union; this is done by the
  <i>i</i> (instance) command. To start with, such an instance has
  an identity matrix stored in the arc; the user needs to
  separately edit the arc to move the instance to some other
  location. If the non-terminal node being extended does not exist,
  it is created first.</p>
  <p>The instance command provides the simplest way to create a
  reference to another node. Instances of a whole list of nodes can
  be added to a non-terminal node by way of the group <i>g</i>
  command. If instances of a list of nodes with non-union boolean
  operations is to be added to a non-terminal node, the region
  <i>r</i> command accepts a list of (operation, name) pairs, where
  the single lower case character ``u'' indicates union, ``--''
  indicates subtraction, and ``+'' indicates intersection. The
  first operation specified is not significant. An example of this
  command might be:</p>
  <div class="c1">
    <i>r non-terminal u node1 -- node2 + node3</i>
  </div>For historical reasons, there is no explicit grouping
  possible, occasionally forcing the user to create intermediate
  non-terminal nodes to allow the realization of the desired
  boolean formula. It is also important to note that for the same
  reasons there is an <i>implicit</i> grouping between union terms,
  i.e.
  <div class="c1">
    u n1 -- n2 + n3 u n4 -- n5
  </div>is evaluated as
  <div class="c1">
    (n1 -- n2 + n3) union (n4 -- n5)
  </div>rather than
  <div class="c1">
    ((((n1 -- n2) + n3) union n4) -- n5)
  </div>Therefore, you can think of the solids on either side of
  the union operators as surrounded by parentheses. The order of
  the region members is critical, and must be scrutinized when
  members are added or deleted from a region. The order can be
  printed out using the <i>l</i> or <i>cat</i> commands.
  <h1>VIEWING FUNCTIONS</h1>
  <p>The MGED viewing features are designed to allow one to examine
  an object in close detail. Any of the viewing features can be
  invoked at any time. It should be noted, that these functions do
  not change the actual data, only the way the data is
  displayed.</p>
  <h2>Preset Views</h2>
  <p>Six standard views (front, rear, top, bottom, left, and right)
  and one oblique view (azimuth 35, elevation 25 isometric) are
  each assigned to the function buttons, views 35 25 (isometric),
  top, right, front, 45 45 are available from the screen editor
  menu. Hence, any of these views is immediately available at the
  press of the appropriate function button or mouse selection. The
  views available are not limited to these standard views however,
  as the display can be rotated to any view by using the dial box.
  By pressing the function button labeled ``save view'' or entering
  the keyboard <i>saveview</i> command, the present view as
  displayed display is saved (used for raytracing, producing
  colored pictures, which will be discussed later). At any time,
  the saved view can be immediately returned to the screen by
  pressing the ``restore view'' function button. The ``restore
  view'' button will be lit whenever a view has been saved. The
  function button labeled ``reset'', restores the display to the
  default view (front) when pressed.</p>
  <h2>View Translation</h2>
  <p>The displays can be panned or slewed on the screen in two ways
  -- using the mouse pointer or by using the dial box knobs. When
  one is editing, the mouse functions are not available for
  slewing, hence one must use the dial box knobs to slew the
  display.</p>
  <p>To slew the display using the control knobs, one uses the
  knobs labeled ``slew x'' or ``slew y''. The null positions on
  these knobs is in the center or straight up. If the ``slew x''
  knob is turned clockwise of center, the display will move to the
  right. If it turned counterclockwise, the display will move to
  the left. For the ``slew y'' central knob, clockwise of the
  center moves the display up and counterclockwise moves the
  display down. The further these knobs are turned from center, the
  faster the display moves.</p>
  <h2>View Zooming</h2>
  <p>One can zoom the display by using the dial box knob labeled
  ``zoom''. Again the null position of this knob is center or
  straight up. Turning this knob clockwise of center causes the
  display to increase in size producing a zoom-in effect. Turning
  this knob counterclockwise of center causes the display to
  decrease in size or zoom-out. Again, the further the ``zoom''
  knob is turned from center, the faster the zooming will
  occur.</p>
  <div class="c1">
    <img src="adc.gif" alt="adc"> <b>The Angle Distance Cursor.</b>
  </div>
  <h2>The Angle Distance Cursor (ADC)</h2>
  <p>The angle distance cursor is a construction aid used to
  measure angles and distances. It should be noted that all
  measurements are made in the projected space of the screen, so
  one should measure only in a view normal to the surface where the
  measurement is to take place. The ADC is placed on (or removed
  from) the display by pushing the ``ADC'' button. The ADC consists
  of three cursors which cover the entire screen. Figure <a href=
  "#adc">adc</a> depicts the ADC as it appears on the screen. All
  the cursors are centered at the same point and can be moved to
  any location on the screen. Two of these cursors rotate for angle
  measuring purposes. Angle cursor 1 is solid while angle cursor 2
  is dashed. Angle cursor 1 has movable tic marks for measuring
  distances on the screen. The two angle cursors move with the
  horizontal and vertical lines of the main cursor. The resulting
  effect is the moving of the center point horizontally or
  vertically. The ADC is controlled by the bottom row of the
  (Megatek) knobs:</p>
  <p>Knob & Function 6 & moves the center in the horizontal
  direction 7 & moves the center in the vertical direction 8 &
  rotates angle cursor 1 (alpha) 9 & rotates angle cursor 2 (beta)
  10 & moves the tic marks</p>
  <p>Whenever the ADC is on the screen, there is a readout at the
  bottom of the screen listing pertinent information about the ADC.
  This information includes the angles that angle cursors 1 and 2
  have been rotated (alpha and beta), the distance the tic marks
  are from the center of the ADC, and the location of the center of
  the ADC. This information is continually updated on the
  screen.</p>
  <h1>MGED EDITING FEATURES</h1>
  <p>The heart of the MGED system is its editing features. The
  editing features are divided into two classes: object editing and
  solid editing. Object editing is designed to allow one to change
  the location, size, and orientation of an object. Recall that an
  object is defined as the basic data unit of the MGED system and
  includes both combinations and solids. In the case of a solid,
  one needs to change not only its location, size, and orientation,
  but also its ``shape''. Changing the shape of a solid means
  changing any of its individual parameters. Hence, solid editing
  is handled separately.</p>
  <h2>Combination Editing (OBJECT EDIT)</h2>
  <p>Before being able to enter the OBJECT EDIT state (i.e. edit
  non-terminal), it is necessary to pass through two intermediate
  states in which the full path of an object to be edited is
  specified, and the location of one arc along that path is
  designated for editing. It is possible to create a transformation
  matrix to be applied above the root of the tree, affecting
  everything in the path, or to apply the matrix between any pair
  of nodes. For example, if the full path /car/chassis/door is
  specified, the matrix could be applied above the node ``car'',
  between ``car/chassis'', or between ``chassis/door''.</p>
  <p>The transformation matrix to be applied at the designated
  location can be created by the concatenation of operations, each
  specified through several types of user direction. Trees can be
  rotated around the center of the viewing cube; this rotation can
  be specified in degrees via keyboard command, or can be
  controlled by the rotation of a set of control dials or motions
  on a three-axis joystick. Translation of trees can be specified
  in terms of a precise new location via keyboard command, or by
  adjusting a set of control dials. Tree translation can also be
  accomplished by pointing and clicking with the mouse or tablet.
  Uniform and single-axis (affine) scaling of a tree can be
  controlled by a numeric scale factor via keyboard command, or by
  way of repeated analog scaling by pointing and clicking with the
  mouse or tablet. Before we discuss the editing features of MGED,
  we will discuss how one selects objects for editing.</p>
  <h2>Selecting Objects For Editing</h2>
  <p>To select a displayed object for editing, press the object
  illuminate button or select ``Object illum'' from the ***BUTTON
  MENU***. The object selection is a two step process.</p>
  <p>Whenever an object is displayed (using the <i>e</i> command),
  all paths in the object's hierarchy are traversed recursively,
  accumulating the transformation matrices. When the bottom of the
  path (a solid) is encountered, the accumulated transformations
  are applied to the solid's parameters and the solid is drawn.
  Thus every solid displayed is really a path ending with that
  solid. If the object has been displayed using the <i>E</i>
  command, the same procedure is followed, but only until a region
  is encountered. Then all members of the region have the
  accumulated transformations applied and the region is then
  ``evaluated'' and drawn.</p>
  <p>In the first step of the object selection process, the path is
  selected. Again, the data tablet is divided in as many horizontal
  sections as there are paths drawn. The path (solid or evaluated
  region) corresponding to the horizontal section the pen/mouse is
  located in will be illuminated (brighter on B/W displays and
  white on color displays). This complete path is also listed on
  the display. When the pen/mouse is pressed the illuminated path
  is selected.</p>
  <p>In the second step, a member of the selected path is chosen.
  All editing will then be applied to this member. The tablet is
  divided into as many horizontal sections as there are path
  members. The word ``[MATRIX]'' is used to illuminate path members
  and will appear above the member corresponding to the location of
  the pen/mouse. Pressing the pen/mouse when the desired path
  member is ``illuminated'' will put MGED in the object edit state.
  The editing will be performed on the path member selected.</p>
  <p>If a solid is located at the bottom of this path, it becomes
  the key solid and its vertex becomes the key point. If an
  evaluated region is at the bottom of the path, the center of this
  region becomes the key point. All object editing is done with
  respect to this key point.</p>
  <p>The object editing features can be invoked in any order and at
  any time once an object has been selected for editing. During
  object editing, any of the viewing features, such as changing
  views, zooming, and slewing, can be used, and in fact, are
  usually quite useful. Again, the only way to exit the object
  editing mode is to ``accept'' or ``reject'' the editing. If the
  ``reject'' button is pressed (or selected from the edit menu),
  the object will return to its pre-edit state. If the ``accept''
  button is pressed (or selected from the edit menu), the data base
  will be changed to reflect the object editing performed.</p>
  <h2>Object Edit State</h2>
  <p>When MGED enters the object edit state, the following
  occurs:</p>
  <ol>
    <li>all the solids/evaluated regions of the edited object
    become illuminated</li>
    <li>the key solid's parameters are labeled OR the center of the
    key evaluated region is marked</li>
    <li>the key solid's parameters are listed and continually
    updated OR the key evaluated region's center is listed and
    continually updated</li>
    <li>the ***OBJ EDIT*** menu is displayed</li>
  </ol>
  <h2>Translate An Object</h2>
  <p>There are three ways to translate an object: translate in the
  screen X direction only (X move), translate in the screen Y
  direction only (Y move) or just straight translation (XY move).
  In all cases, the complete object is translated so that the ``key
  point'' is positioned at the desired location. The
  <i>translate</i> command is used to enter a precise location
  (x,y,z) for the key point. Entering <i>translate x y z</i> will
  move the complete object so that the key point will be at
  coordinates (x,y,z).</p>
  <h2>Rotate An Object</h2>
  <p>Rotation of the object may be accomplished by selecting the
  ``Rotate'' menu item, or pressing the ``Rotate'' button. Turning
  the knobs results in the object being rotated. The <i>rotobj x y
  z</i> command can be used here, to specify a precise rotation in
  degrees. While in this edit state, the only way to rotate view is
  to use the <i>vrot x y z</i> command.</p>
  <h2>Scale An Object</h2>
  <h3>Global Scale</h3>
  <p>To select global object scale, press the object scale button
  or select ``Scale'' from the ***OBJ EDIT*** menu. When the
  pen/mouse is pressed, the edited object is scaled about the key
  point by an amount proportional to the distance the pen/mouse is
  from the center of the screen. If the pen/mouse is above the
  center, the edited object will become larger. If it is below the
  center, the object will become smaller. The <i>scale</i> command
  can be used to enter precise scale factors. The value entered is
  applied to the object as it existed when object scale was
  entered. Hence entering <i>scale 1</i> will return the object to
  its size when the object scale session first started.</p>
  <h3>Local Scale</h3>
  <p>Local object scaling is allowed about any of the coordinate
  axes. To select local scaling, press one of the buttons (OBJ
  Scale X, OBJ Scale Y, or OBJ Scale Z) or select ``Scale X'',
  ``Scale Y'', or ``Scale Z'' from the ***OBJ EDIT*** menu. When
  the pen/mouse is pressed, the edited object is scaled in the
  selected coordinate axis only, about the key point. The amount of
  scaling is proportional to the distance the pen/mouse is from the
  center of the screen. If the pen/mouse is above the center, the
  edited object will become larger in the selected axis direction.
  If it is below the center, the object will become smaller in the
  selected axis direction. The <i>scale</i> command can be used to
  enter precise scale factors. The value entered is applied to the
  object as it existed when local object scale was entered. Hence
  entering <i>scale 1</i> will return the object (in the selected
  axis direction) to its size when the object scale session first
  started.</p>
  <h2>Solid Editing</h2>
  <p>There are two classes of editing operations that can be
  performed on leaf nodes, the primitive solids. The first class of
  operations are generic operations which can be applied to any
  type of solid, and the second class of operations are those
  operations which are specific to a particular type of solid.
  Generic operations which can be applied to all primitive solids
  are rotation, translation and scaling. Recall that primitives can
  be treated as any other object and ``object edited'' as detailed
  above. Each primitive solid also has a variety of editing
  operations available that are specific to the definition of that
  solid. These operations are detailed below.</p>
  <p>The solid editing mode is necessary to perform to basic shapes
  of solids. Precise modifications of the shape are possible (using
  the <i>p</i> keyboard command) in the solid editing mode.</p>
  <p>The solid editing feature allows the user to interactively
  translate, rotate, scale, and modify individual parameters of a
  solid. Whenever one is in the solid edit mode, the parameters of
  the solid being edited are listed and continually updated at the
  top of the screen. Certain parameters are also labeled on the
  solid being edited. Solid editing is generally used to ``build''
  objects by producing solids of the desired shape and size in the
  correct orientation and position. Once the object is built,
  object editing is used to scale, orient, and position the object
  in the description. The general philosophy of solid editing is to
  first create a solid with the desired name and then to edit this
  solid. As an example, suppose one were to build an object called
  ``BRACKET''; to produce the base of the object the primitive
  solid type ARB8 (see Figure 1) would be used along with either
  the <i>in</i> command or <i>make</i> command, so one would type:
  \begin{verse} in btm box 0 0 0 0 -90 0 40 0 0 0 0 6 make block
  arb8 \end{verse} A new solid called ``btm'' or ``block'' would be
  created and displayed on the screen. These solids would then be
  edited using solid editing to produce the solid parameters for
  the shape desired.</p>
  <h2>Selecting Solids For Editing</h2>
  <p>The procedure for solid editing is quite similar to that for
  object editing. First, solid edit state must be entered, by
  pressing the ``solid illuminate'' button, or selecting the
  ``solid illum'' menu item. Second, A solid is selected for
  editing using the illuminate mode, just as in object editing, by
  moving the cursor up and down, and choosing the desired solid.
  The solid data is listed at the top of the screen and a header
  depending on the solid type is written above the solid editing
  data. Third, select the appropriate function button or edit menu
  operations, and perform the editing desired. Finally, the solid
  editing mode is exited by either accepting or rejecting the
  editing performed.</p>
  <p>A solid must be displayed before it can be picked for editing.
  To pick a displayed solid for editing, press the ``solid illum''
  button or select ``Solid Illum'' from the ***BUTTON MENU***. The
  data tablet and pen/mouse are then used to pick the solid. The
  surface of the data tablet is divided into as many horizontal
  sections as there are solids displayed. The displayed solid
  corresponding to the horizontal section the pen/mouse is located
  in will be ``illuminated'' (it will become brighter on black and
  white devices and white on color devices). The complete
  hierarchical path to reach the solid is also listed on the
  display. When the pen/mouse is pressed, MGED enters the solid
  edit state with the illuminated solid as the solid to be edited.
  If the solid is not multiply referenced, entering <i>sed
  solidname</i> on the keyboard will immediately put MGED in the
  solid edit state with <i>solidname</i> as the edited solid.</p>
  <h2>Solid Edit State</h2>
  <p>When MGED enters the solid edit state, the following
  occurs:</p>
  <ol>
    <li>the edited solid remains illuminated</li>
    <li>the edited solid's parameters are labeled</li>
    <li>the edited solid's parameters are listed</li>
    <li>(and continually updated)</li>
    <li>the <b>***SOLID EDIT***</b> menu is displayed</li>
    <li>the parameter edit menu is initially displayed
    (default)</li>
  </ol>
  <h2>Rotate A Solid</h2>
  <p>Solid rotation allows the user to rotate the solid being
  edited to any desired orientation. The rotation is performed
  about the vertex of the solid. To select this option, one presses
  the function button labeled ``solid rotate'' or selects from the
  edit menu on screen. The rotation can be done using the dial box
  or one can input exact angles of rotation of the solid by using
  the <i>p</i> keyboard command. For example, typing: <i>\center p
  alpha beta gamma</i> will rotate the solid <i>alpha</i> degrees
  about the x-axis, <i>beta</i> degrees about the y-axis and
  <i>gamma</i> degrees about the z-axis. Alpha, beta, and gamma are
  measured from the original ``zero'' orientation of the solid,
  defined when the ``solid edit'' function button was pressed.
  Hence, typing <i>\center p 0 0 0</i> will always return the solid
  to its original position (its position when the current solid
  editing session began) before accepting edit.</p>
  <p>To select solid rotation, press the solid rotate button or
  select ``Rotate'' from the <b>***SOLID EDIT***</b> menu. The joy
  stick or appropriate rotation knobs then will rotate the edited
  solid about the coordinate axes. The solid is rotated about its
  vertex. The parameter (p) command can be used to make precise
  rotation changes. The values entered after the p are absolute --
  the rotations are applied to the solid as it existed when solid
  rotation was first selected. Thus entering <i>p 0 0 0</i> will
  ``undo'' any rotations performed since solid rotation was
  selected. The rotation about the z-axis is done first, then the
  y, then the x.</p>
  <h2>Translate A Solid</h2>
  <p>Solid translation allows the user to place the solid being
  edited anywhere in the description. To invoke this option, one
  presses the function button labeled ``solid trans'' or selects
  from the screen edit menu. To move the solid, use the mouse
  pointer to position the solid and click the center mouse button.
  Whenever the mouse button is pressed, the VERTEX of the solid
  moves to that location on the screen.</p>
  <p>One can read the actual coordinates of the vertex on the top
  of the screen, along with other data. If the actual desired
  coordinates of the vertex are known, one can place the solid
  exactly using the <i>p</i> keyboard command. For example, to
  place a solid's vertex at the coordinates (x,y,z) one would type:
  <i>\center p40 20 10</i> The solid would then jump to this
  location.</p>
  <p>To select solid translation, press the solid translate button
  or select ``Translate'' from the <b>***SOLID EDIT***</b> menu.
  When the pen/mouse is pressed, the vertex of the edited solid
  will move to that location. The parameter (p) command can be used
  to translate the solid to a precise location. Entering <i>p x y
  z</i> will place the vertex of the edited solid at (x, y, z).</p>
  <h2>Scale A Solid</h2>
  <p>The solid SCALE feature allows the user to scale the solid
  being to any desirable size. The scaling is done about the vertex
  of the solid, hence NO translation of the solid occurs. The
  scaling is performed using the mouse pointer and clicking the
  center mouse button, just as in object scaling. One can input an
  exact scale factor using the <i>p</i> keyboard command, in the
  form of. For example, typing <i>\center p factor</i> will scale
  the solid by an amount equal to <i>factor</i>. The value of
  <i>factor</i> is absolute -- the original solid is scaled. By
  setting <i>factor</i> equal to one (1), the original size solid
  will be displayed on the screen before accepting your edit.</p>
  <p>To select solid scale, press the solid scale button or select
  ``Scale'' from the <b>***SOLID EDIT***</b> menu. When the
  pen/mouse is pressed, the edited solid is scaled by an amount
  proportional to the distance the pen/mouse is from the center of
  the screen. If the pen/mouse is above the center, the edited
  solid will become larger. If it is below the center, the solid
  will become smaller. The parameter (p) command can be used to
  enter precise scale factors. The value entered is applied to the
  solid as it existed when solid scale was entered. Hence entering
  <i>p 1</i> will return the solid to its size when solid scale
  session first started.</p>
  <h2>Solid Parameter Editing</h2>
  <p>To modify individual solid parameters, press the menu button
  or select ``edit menu'' from the <b>***SOLID EDIT***</b> menu. A
  menu listing what parameter editing is available for that
  particular solid type will be displayed. Using the pen/mouse
  select the desired item(s) from this menu. For most of the
  parameter editing, the <i>p</i> command can be used to make
  precise changes. Parameter editing is the default edit mode
  entered when MGED first enters the solid edit state. In the
  following paragraphs, we will discuss parameter editing for each
  of the MGED general types of solids.</p>
  <div class="c1">
    <img src="menu-arb-ctl.gif" alt="menu-arb-ctl"> <b>ARB Control
    Menu.</b>
  </div>
  <h3>ARB Parameter Editing</h3>
  <p>The GENERAL ARB class of solids represents all the convex
  polyhedrons (RPP, BOX, RAW, and ARBs). The ARBs comprise five
  classes of polyhedrons each with a characteristic number of
  vertices. These are the ARB8, ARB7, ARB6, ARB5, and ARB4, where
  the ARB8 has eight vertices, etc. During editing, all the
  vertices are labeled on the screen.</p>
  <p>An ARB is defined by a fixed number of vertices where all
  faces must be planar. This fact means that during parameter
  editing, movement of individual vertices in faces containing four
  vertices is not allowed. There are three classes of parameter
  editing that can be done to ARBs: move edges, move faces, and
  rotate faces. There is an ``ARB control menu'' (see Figure
  <a href="#menu-arb-ctl">menu-arb-ctl</a>) from which one selects
  the type of parameter editing to be done. A specific ARB edit
  menu will appear dependent on which parameter editing option was
  selected. The ``return'' entry on each of these specific menus
  will return the ``ARB control'' menu to the screen.</p>
  <p>Note that there are several keyboard commands that apply only
  to ARB solids which are being edited in SOLID EDIT state. Once
  such command is <i>mirface</i>, which replaces a designated face
  of the ARB with a copy of an original face mirrored about the
  indicated axis. Another such command is <i>extrude</i>, which
  projects a designated face a given amount in the indicated
  direction.</p>
  <div class="c1">
    <img src="menu-arb8-edge.gif" alt="menu-arb8-edge"> <b>Move
    Edge Menu for ARB8.</b>
  </div>
  <div class="c1">
    <img src="menu-arb4-edge.gif" alt="menu-arb4-edge"> <b>Move
    Edge Menu for ARB4.</b>
  </div>
  <div class="c1">
    <img src="menu-arb8-face.gif" alt="menu-arb8-face"> <b>Move
    Face Menu for ARB8.</b>
  </div>
  <div class="c1">
    <img src="menu-arb4-face.gif" alt="menu-arb4-face"> <b>Move
    Face Menu for ARB4.</b>
  </div>
  <h3>Move ARB Edges</h3>
  <p>To move an ARB edge, select the desired edge from the ``move
  edge'' menu. For example, Figure <a href=
  "#menu-arb8-edge">menu-arb8-edge</a> shows the menu for moving an
  edge of an ARB8, and Figure <a href=
  "#menu-arb4-edge">menu-arb4-edge</a> shows the menu for moving an
  edge of an ARB4. A point is then ``input'' either through a pen
  press or through the <i>p</i> command. The line containing the
  selected edge is moved so that it goes through coordinate of the
  input point. Any affected faces are automatically adjusted to
  remain planar.</p>
  <h3>Move ARB Faces</h3>
  <p>To move an ARB face, select the desired face from the ``move
  face'' menu. A point is then ``input'' either through a pen press
  or through the <i>p</i> command. The plane containing the edited
  face is then moved so that it contains the input point. The new
  face is then calculated and the ARB is displayed. The move face
  menus for an ARB8 are shown in Figure <a href=
  "#menu-arb8-face">menu-arb8-face</a>, and the move face menus for
  an ARB4 are shown in Figure <a href=
  "#menu-arb4-face">menu-arb4-face</a>.</p>
  <div class="c1">
    <img src="menu-arb8-rot.gif" alt="menu-arb8-rot"> <b>Rotate
    Face Menu for ARB8.</b>
  </div>
  <div class="c1">
    <img src="menu-arb4-rot.gif" alt="menu-arb4-rot"> <b>Rotate
    Face Menu for ARB4.</b>
  </div>
  <h3>Rotate ARB Faces</h3>
  <p>ARB faces may be rotated around any of the vertices comprising
  that face. First, select the desired face from the ``rotate
  face'' menu. You will then be asked to select the vertex number
  around which to rotate the face. The face can be rotated about
  the three coordinate axes. The knobs (Rotate X, Rotate Y, and
  Rotate Z) are used for this purpose. For precise rotations, use
  the <i>p</i> command. If three values are entered after the
  <i>p</i>, then they are interpreted as angles (absolute) of
  rotation about the X, Y, Z axes respectively. If only two values
  are entered, then they are considered as rotation and fallback
  angles for the normal to that face. The <i>eqn</i> command can
  also be used here to define the plane equation coefficients of
  the face being rotated. The rotate face menus for an ARB8 are
  shown in Figure <a href="#menu-arb8-rot">menu-arb8-rot</a>, and
  the rotate face menus for an ARB4 are shown in Figure <a href=
  "#menu-arb4-rot">menu-arb4-rot</a>.</p>
  <div class="c1">
    <img src="ped-tgc.gif" alt="ped-tgc"> <b>Typical TGC During
    Parameter Editing.</b>
  </div>
  <h3>Truncated General Cone (TGC) Parameter Editing</h3>
  <p>The TGC general class of solids includes all the cylindrical
  COMGEOM solids. The defining parameters of the TGC are two base
  vectors (A and B), a height vector (H), two top vectors (C and
  D), and the vertex (V). The top vectors C and D are directed the
  same as the base vectors A and B respectively, hence the top
  vectors are defined only by their lengths (c and d). During solid
  editing, only vectors A and B are labeled on the display. Figure
  <a href="#ped-tgc">ped-tgc</a> depicts a typical TGC during
  parameter editing.</p>
  <p>It is possible to change the length of the H, A, B, C, or D
  vectors, resulting in a change in height or eccentricity of the
  end plates. The overall size of the A,B or C,D end plates can be
  adjusted, or the size of both can be changed together, leaving
  only the H vector constant. The H vector or the base plate (AXB)
  can be rotated. Recall that vectors A \& C and vectors B \& D
  have like directions, hence rotating the base (AXC) will
  automatically rotate the top (BXD). Finally, one can move the end
  of the height vector H with the TGC becoming or remaining a right
  cylinder (move end H (rt)), or with the orientation of the base
  (and top) unchanged (move end H). Either the mouse/tablet or the
  <i>p</i> command can be used. These functions are selected from
  the menu which can be seen in Figure <a href=
  "#ped-tgc">ped-tgc</a>.</p>
  <div class="c1">
    <img src="ped-ell.gif" alt="ped-ell"> <b>Ellipsoid Parameter
    Editing Menu.</b>
  </div>
  <h3>Ellipsoid Parameter Editing</h3>
  <p>The ELLG general class represents all the ellipsoidal solids,
  including spheres and ellipsoids of revolution. The defining
  parameters of the ELLG are three mutually perpendicular vectors
  (A, B, and C) and the vertex (V). When an ELLG is being edited,
  only vectors A and B are labeled on the display. Figure <a href=
  "#ped-ell">ped-ell</a> depicts a typical ELLG during parameter
  editing.</p>
  <p>The parameter editing of the ELLG consists of scaling the
  lengths of the individual vectors A, B, C. One may also scale all
  these vectors together of equal length.</p>
  <p>The scaling of these vectors is done using the data
  tablet/mouse in exactly the same manner as in object scaling. The
  <i>p</i> keyboard command again can be used to produce a vector
  of desired length.</p>
  <div class="c1">
    <img src="ped-tor.gif" alt="ped-tor"> <b>Torus Parameter
    Editing Menu.</b>
  </div>
  <h3>Torus Parameter Editing</h3>
  <p>The TOR general class of solids contains only one type of
  torus, one with circular cross-sections. The defining parameters
  of the TOR are two radii (r1 and r2), a normal vector (N), and
  the vertex (V). The scalar r1 is the distance from the vertex to
  the midpoint of the circular cross section. The scalar r2 is the
  radius of the circular cross-section. The vector N is used to
  orient the torus. During solid editing, none of these parameters
  are labeled on the screen. Figure <a href="#ped-tor">ped-tor</a>
  depicts a typical torus during parameter editing.</p>
  <p>The parameter editing of the TOR consists of scaling the
  radii, hence the menu contains only two members.</p>
  <h1>KEYBOARD COMMANDS</h1>
  <p>The MGED keyboard commands are used to maintain overall
  control of the system and to perform general housekeeping
  functions. They are summarized in Figure <a href=
  "#cmd-summary">cmd-summary</a>.</p>
  <div class="c1">
    <table border="1">
      <tr>
        <th>Command</th>
        <th>Argument[s]</th>
        <th>Description</th>
      </tr>
      <tr>
        <td>e</td>
        <td>obj1* obj2* ... objn*</td>
        <td>display objects on the screen</td>
      </tr>
      <tr>
        <td>E</td>
        <td>obj1* obj2* ... objn*</td>
        <td>display objects evaluating regions</td>
      </tr>
      <tr>
        <td>B</td>
        <td>obj1* obj2* ... objn*</td>
        <td>Zap screen, display objects</td>
      </tr>
      <tr>
        <td>d</td>
        <td>obj1* obj2* ... objn*</td>
        <td>delete objects from screen</td>
      </tr>
      <tr>
        <td>cp</td>
        <td>oldobj newobj</td>
        <td>copy 'oldobj' to 'newobj'</td>
      </tr>
      <tr>
        <td>cpi</td>
        <td>oldtgc newtgc</td>
        <td>copy 'oldtgc' to 'newtgc' inverted</td>
      </tr>
      <tr>
        <td>Z</td>
        <td>-none-</td>
        <td>Zap (clear) the screen</td>
      </tr>
      <tr>
        <td>g</td>
        <td>groupname obj1* obj2*....objn*</td>
        <td>group objects</td>
      </tr>
      <tr>
        <td>r</td>
        <td>region op1 sol1....opn soln</td>
        <td>create/modify a region</td>
      </tr>
      <tr>
        <td>i</td>
        <td>object instname</td>
        <td>create instance of an object</td>
      </tr>
      <tr>
        <td>mv</td>
        <td>oldname newname</td>
        <td>rename object</td>
      </tr>
      <tr>
        <td>mvall</td>
        <td>oldname newname</td>
        <td>rename all occurrences of an object</td>
      </tr>
      <tr>
        <td>l</td>
        <td>object*</td>
        <td>list object information</td>
      </tr>
      <tr>
        <td>kill</td>
        <td>obj1* obj2* ... objn*</td>
        <td>remove objects from the file</td>
      </tr>
      <tr>
        <td>killall</td>
        <td>obj1* obj2* ... objn*</td>
        <td>remove object[s] + references from file</td>
      </tr>
      <tr>
        <td>killtree</td>
        <td>obj1* objn* ... objn*</td>
        <td>remove complete paths **CAREFUL**</td>
      </tr>
      <tr>
        <td>t</td>
        <td>object*</td>
        <td>table of contents</td>
      </tr>
      <tr>
        <td>mirror</td>
        <td>oldobj newobj axis</td>
        <td>mirror image of an object</td>
      </tr>
      <tr>
        <td>mirface</td>
        <td>\#\#\#\# axis</td>
        <td>mirror face \#\#\#\# about an axis</td>
      </tr>
      <tr>
        <td>extrude</td>
        <td>\#\#\#\# distance</td>
        <td>extrude an arb face</td>
      </tr>
      <tr>
        <td>item</td>
        <td>region item air</td>
        <td>change region item/air codes</td>
      </tr>
      <tr>
        <td>mater</td>
        <td>region material los</td>
        <td>change region mat/los codes</td>
      </tr>
      <tr>
        <td>rm</td>
        <td>comb mem1* mem2*....memn*</td>
        <td>delete members from combination</td>
      </tr>
      <tr>
        <td>units</td>
        <td>mm|cm|m|in|ft</td>
        <td>change the units of the objectfile</td>
      </tr>
      <tr>
        <td>title</td>
        <td>new-title</td>
        <td>change the title of the description</td>
      </tr>
      <tr>
        <td>p</td>
        <td>dx [dy dz]</td>
        <td>precise commands for solid editing</td>
      </tr>
      <tr>
        <td>rotobj</td>
        <td>xdeg ydeg zdeg</td>
        <td>rotate(absolute) an edited object</td>
      </tr>
      <tr>
        <td>scale</td>
        <td>factor</td>
        <td>scale(absolute) an edited object</td>
      </tr>
      <tr>
        <td>translate</td>
        <td>x y z</td>
        <td>translate an edited object</td>
      </tr>
      <tr>
        <td>arb</td>
        <td>name rot fb</td>
        <td>make arb8 with rot and fb</td>
      </tr>
      <tr>
        <td>analyze</td>
        <td>solids</td>
        <td>print much info about a solid</td>
      </tr>
      <tr>
        <td>summary</td>
        <td>s|r|g</td>
        <td>solid/region/group summary</td>
      </tr>
      <tr>
        <td>tops</td>
        <td>-none-</td>
        <td>list all top level objects</td>
      </tr>
      <tr>
        <td>find</td>
        <td>obj1* obj2* ... objn*</td>
        <td>find all references to an object</td>
      </tr>
      <tr>
        <td>area</td>
        <td>[endpoint-tolerance]</td>
        <td>find presented area of E'd objects</td>
      </tr>
      <tr>
        <td>plot</td>
        <td>[-zclip] [-2d] [out-file] [| filter]</td>
        <td>make UNIX-plot of view</td>
      </tr>
      <tr>
        <td>color</td>
        <td>low high r g b str</td>
        <td>assign color(r g b) to item range</td>
      </tr>
      <tr>
        <td>edcolor</td>
        <td>-none-</td>
        <td>text edit the color/item assignments</td>
      </tr>
      <tr>
        <td>prcolor</td>
        <td>-none-</td>
        <td>print the current color/item assignments</td>
      </tr>
      <tr>
        <td>make</td>
        <td>name type</td>
        <td>create and display a primitive</td>
      </tr>
      <tr>
        <td>fix</td>
        <td>-none-</td>
        <td>restart the display after hangup</td>
      </tr>
      <tr>
        <td>rt</td>
        <td>[options]</td>
        <td>raytrace view onto framebuffer</td>
      </tr>
      <tr>
        <td>release</td>
        <td>-none-</td>
        <td>release current display processor</td>
      </tr>
      <tr>
        <td>attach</td>
        <td>nu|tek|tek4109|plot|mg|vg|rat</td>
        <td>attach new display processor</td>
      </tr>
      <tr>
        <td>ae</td>
        <td>az elev</td>
        <td>rotate view w/azim and elev angles</td>
      </tr>
      <tr>
        <td>regdef</td>
        <td>item [air los mat]</td>
        <td>set default codes for next region created</td>
      </tr>
      <tr>
        <td>ted</td>
        <td>-none-</td>
        <td>text edit a solids parameters</td>
      </tr>
      <tr>
        <td>vrot</td>
        <td>xdeg ydeg zdeg</td>
        <td>rotate view</td>
      </tr>
      <tr>
        <td>ill</td>
        <td>name</td>
        <td>illuminate object</td>
      </tr>
      <tr>
        <td>sed</td>
        <td>solidname</td>
        <td>solid edit the named solid</td>
      </tr>
      <tr>
        <td>center</td>
        <td>x y z</td>
        <td>set view center</td>
      </tr>
      <tr>
        <td>press</td>
        <td>button-label</td>
        <td>emulate button press</td>
      </tr>
      <tr>
        <td>knob</td>
        <td>id value</td>
        <td>emulate knob twist</td>
      </tr>
      <tr>
        <td>size</td>
        <td>value</td>
        <td>set view size</td>
      </tr>
      <tr>
        <td>x</td>
        <td>-none-</td>
        <td>debug list of objects displayed</td>
      </tr>
      <tr>
        <td>status</td>
        <td>-none-</td>
        <td>print view status</td>
      </tr>
      <tr>
        <td>refresh</td>
        <td>-none-</td>
        <td>send new control list</td>
      </tr>
      <tr>
        <td>edcomb</td>
        <td>comb flag item air mat los</td>
        <td>edit comb record info</td>
      </tr>
      <tr>
        <td>edgedir</td>
        <td>delta\_x delta\_y delta\_z</td>
        <td>define direction of an ARB edge being moved</td>
      </tr>
      <tr>
        <td>in</td>
        <td>name type {parameters}</td>
        <td>type-in a new solid directly</td>
      </tr>
      <tr>
        <td>prefix</td>
        <td>string obj1* obj2* ... objn*</td>
        <td>prefix objects with 'string'</td>
      </tr>
      <tr>
        <td>keep</td>
        <td>file.g obj1* obj2* ... objn*</td>
        <td>keep objects in 'file.g'</td>
      </tr>
      <tr>
        <td>tree</td>
        <td>obj1* obj2* ... objn*</td>
        <td>list tree for objects</td>
      </tr>
      <tr>
        <td>inside</td>
        <td>--prompted for input--</td>
        <td>find inside solid</td>
      </tr>
      <tr>
        <td>solids</td>
        <td>file obj1* obj2* ... objn*</td>
        <td>make ascii solid parameter summary in 'file'</td>
      </tr>
      <tr>
        <td>regions</td>
        <td>file obj1* obj2* ... objn*</td>
        <td>make ascii region summary in 'file'</td>
      </tr>
      <tr>
        <td>idents</td>
        <td>file obj1* obj2* ... objn*</td>
        <td>make ascii region ident summary in 'file'</td>
      </tr>
      <tr>
        <td>edcodes</td>
        <td>obj1* obj2* ... objn*</td>
        <td>edit region ident codes</td>
      </tr>
      <tr>
        <td>dup</td>
        <td>file {prefix}</td>
        <td>checks for dup names in 'file' \& current file</td>
      </tr>
      <tr>
        <td>cat</td>
        <td>file {prefix}</td>
        <td>cat's 'file' onto end of current file</td>
      </tr>
      <tr>
        <td>track</td>
        <td>--prompted for input--</td>
        <td>builds track given appropriate 'wheel' data</td>
      </tr>
      <tr>
        <td>3ptarb</td>
        <td>--prompted for input--</td>
        <td>makes arb8 given 3 pts, etc.</td>
      </tr>
      <tr>
        <td>rfarb</td>
        <td>--prompted for input--</td>
        <td>makes arb8 given point, rot, fallback, etc.</td>
      </tr>
      <tr>
        <td>whichid</td>
        <td>ident1 ident2 ... identn</td>
        <td>list all regions with given ident</td>
      </tr>
      <tr>
        <td>paths</td>
        <td>--prompted for input--</td>
        <td>lists all paths matching input path</td>
      </tr>
      <tr>
        <td>listeval</td>
        <td>-prompted for input--</td>
        <td>gives 'evaluated' path summary</td>
      </tr>
      <tr>
        <td>copyeval</td>
        <td>--prompted for input--</td>
        <td>copy an 'evaluated' path-solid</td>
      </tr>
      <tr>
        <td>tab</td>
        <td>obj1* obj2* ... objn*</td>
        <td>list objects as stored in data file</td>
      </tr>
      <tr>
        <td>push</td>
        <td>obj1* obj2* ... objn*</td>
        <td>push object transformations to solids</td>
      </tr>
      <tr>
        <td>facedef</td>
        <td>\#\#\#\# {data}</td>
        <td>define plane of an edited ARB face</td>
      </tr>
      <tr>
        <td>eqn</td>
        <td>A B C</td>
        <td>define plane coefficients of rotating ARB face</td>
      </tr>
      <tr>
        <td>q</td>
        <td>-none-</td>
        <td>quit</td>
      </tr>
      <tr>
        <td>%</td>
        <td>-none-</td>
        <td>escape to shell</td>
      </tr>
      <tr>
        <td>?</td>
        <td>-none-</td>
        <td>help message</td>
      </tr>
      <caption>
        MGED Command Summary 3
      </caption>
    </table>
  </div>
  <h2>Copy Object</h2>
  <div class="c1">
    <i>cp oldobj newobj</i>
  </div>
  <p>This command is used to produce a copy of an object (solid or
  comb). In this case, the object "oldobj" will be copied into an
  object called "newobj".</p>
  <p>Examples:</p>
  <pre>
              cp arb8 hullbot.s
              cp tgc wheelrim.s
              cp torso.r driver_torso
              cp proto.man driver
</pre>
  <h2>Zap Screen</h2>
  <div class="c1">
    <i>Z</i>
  </div>
  <p>This is the Zap command. It clears all objects from the
  screen.</p>
  <h2>Drop objects from display screen</h2>
  <div class="c1">
    <i>d obj1 obj2 ... objn</i>
  </div>
  <p>This command allows one to remove objects from the display
  screen. In this case "obj1" thru "objn" will be removed from the
  display.</p>
  <h2>Move (rename) object</h2>
  <div class="c1">
    <i>mv old new</i>
  </div>
  <p>This command is used to rename objects in the data file. In
  this case, the object "old" will be renamed "new". A note of
  caution: the name is changed only in the object record itself,
  not in any member records. Thus if the object "old" appears as a
  member of any other object, the name will not be changed there.
  To rename all occurrences of an object, use the "mvall"
  command.</p>
  <p>Examples:</p>
  <pre>
              mv test hull
              mv g00 air
              mv g1 turret
</pre>
  <h2>Set Local Working Units</h2>
  <p><i>\center units ab</i></p>
  <p>This command allows one to change the local or working units
  at ANY time. The only allowable values for "ab" are "mm", "cm",
  "m", "in", or "ft".</p>
  <p>Examples:</p>
  <pre>
           units mm
           units in
</pre>
  <h2>Group objects</h2>
  <p><i>\center g group obj1 obj2 ..... objn</i></p>
  <p>This command creates or appends to a combination record and is
  used to group objects together either for editing or displaying
  purposes. In this case, "obj1" through "objn" are added as
  members to the combination "group". If "group" does not exist, it
  is created and "obj1" through "objn" are added as members. NOTE:
  no checking to see if "obji" is already a member of "group".</p>
  <p>Examples:</p>
  <pre>
            g shell hull turret
            g tank wheels engine crew shell
            g tank track
</pre>
  <h2>Create Region</h2>
  <p><i>\center r region op1 sol1 op2 sol2 .... opn soln</i></p>
  <p>This command is used to create regions or append to regions.
  If "region" exists, then solids "sol1" through "soln" are added
  as members with "op1" through "opn" as the defining operations.
  If "region" does not exist, then it is created and solids "sol1"
  through "soln" are added as members with "op1" through "opn" as
  the defining operations. A region is merely a combination record
  with a flag set and is distinguished from other combinations
  (groups) since it has meaning to the COMGEOM solid modeling
  system. Note that "+" or "u" must be the first operations in a
  region.</p>
  <p>When a region is created, the item and air codes are set equal
  to default values. If the "regdef" command has been used, then
  those values will be used, otherwise the values "1000 0 100 1"
  will be used respectively. To change the item and air codes use
  the "item" command. The "edcodes" command is probably the easiest
  and fastest way to change these identifying codes. Note: In the
  past, all members of a region had to be solids, but recently
  combinations have been allowed as members of regions. Hence, the
  names "soli" can also be combinations (groups) now. Also, as in
  grouping, no checking for members already in a region.</p>
  <p>Examples:</p>
  <pre>
             r hulltop.r + hulltop.s -- hullleft.s -- hullright.s
             r gun + gun.s -- gunin.s
             r gunair + gunin.s
</pre>
  <h2>Instance an object</h2>
  <p><i>\center i object combname</i></p>
  <p>This command is used to make an instance of an object. An
  instance of an object is produced by creating a combination and
  making the object a member. In this case, an instance of "object"
  is made by creating the combination record "combname" (if
  "combname" does not already exist) and adding "object" as a
  member. If "combname" already exists, then "object" is added as
  the next member.</p>
  <p>An instance is used to refer to an object, without making
  actual copies of the object. Instances are useful when one is
  adding a certain component to a target description many times.
  Furthermore, any modifications to an object which has been
  instanced need only be done in the original (prototype) object.
  These modifications will then be automatically reflected in all
  the instances of the object.</p>
  <p>Examples:</p>
  <pre>
                i heround he1 .he1.
                i heround he2 .he2.
                i heat heat1 .heat1.
                i heat heat2 .heat2.
</pre>
  <h2>Change Title of Database</h2>
  <p><i>\center title newtitle</i></p>
  <p>This command allows one to change the title of the model
  database at any time. The string "newtitle" will become the new
  title, and may contain blanks. The title is limited to 72
  characters including blanks.</p>
  <p>Examples:</p>
  <pre>
          title XM89A -- New version of tank
          title M345 (groups are m345 and m345a)
</pre>
  <h2>Extrude</h2>
  <p><i>\center extrude \#\#\#\# distance</i></p>
  <p>This command allows the user to project a face(\#\#\#\#) of an
  arb being edited a normal distance to create a new arb. The value
  of "face" is 4 digits such as 1256. If the face is projected in
  the wrong direction use a negative "distance". One common use for
  this command is for producing armor plates of a desired
  thickness.</p>
  <p>Examples:</p>
  <pre>
              extrude 1234 20
              extrude 2367 34.75
              extrude 2367 -34.75
</pre>
  <h2>Remove members from Combination</h2>
  <p><i>\center rm comb mem1 mem2 .... memN</i></p>
  <p>This command allows one to delete members from a combination
  (group or region) record. In this case, members "mem1" through
  "memn" will be deleted from the combination "comb".</p>
  <p>Examples:</p>
  <pre>
              rm tank hull wheels
              rm region1 solid8 solid112
              rm turtop.r tursidel.s tursider.s
</pre>
  <h2>List Object Information</h2>
  <p><i>\center l object</i></p>
  <p>This command is used to list information about objects in the
  data file. The information listed depends on what type of record
  "object" is. If "object" is a combination record, then the
  members are listed. If "object" is a solid record, then the MGED
  general solid type and the parameters as presently in the data
  file are listed. Note: only the solid parameters as they exist in
  the solid record are listed, no transformation matrix is applied.
  Hence, if the solid was edited as a member of a combination, the
  "l" command will not reflect the editing in the listed
  parameters. To produce this type of listing, see the "listeval"
  command.</p>
  <p>Examples:</p>
  <pre>
               l hull
               l turret
               l turtop.s
               l arb8
</pre>
  <h2>Analyze Solid</h2>
  <p><i>\center analyze solid</i></p>
  <p>This command produces information about a solid (all except
  ARS). The information includes surface area(s) and volume. Also,
  in the case of ARBs, edge lengths and rot and fallback angles and
  plane equations are given for each face. If "solid" is present
  that solid name will be used and analyzed. If "solid" is absent,
  the solid at the bottom of the present path being edited will be
  analyzed.</p>
  <h2>Mirror Object</h2>
  <p><i>\center mirror oldobj newobj axis</i></p>
  <p>This command is used to create a new object which is the
  mirror image of an existing object about an axis. The object may
  be either a solid or a combination. In this case, a mirror image
  of the object "oldobj" will created about the axis indicated by
  "axis" and the new object record will be called "newobj". The
  only acceptable values for the parameter "axis" are "x", "y", and
  "z".</p>
  <p>Examples:</p>
  <pre>
              mirror tur.left.s tur.right.s y
              mirror tur.top.s tur.bot.s z
              mirror tur.front.s tur.back.s x
              mirror lt\_gun rt\_gun y
</pre>
  <h2>Create ARB8</h2>
  <p><i>\center arb name rot fb</i></p>
  <p>This command allows one to create an arb8 with the desired
  rotation and fallback angles. In this case, an arb8 with the name
  of "name" will be created with the desired rotation angle of
  "rot" degrees and the fallback angle of "fb" degrees.</p>
  <p>Examples:</p>
  <pre>
           arb top1.s 0 90
           arb sidelt.s 90 0
           arb upglacis.s 0 60
</pre>
  <h2>Change Item (Ident) and Air codes of Region</h2>
  <p><i>\center item region ident air</i></p>
  <p>This command allows one to change the item or air code numbers
  of a region. If the air code ("air") is not included, a zero is
  assumed. To change the air code, a zero item code must be used
  (see second example below).</p>
  <p>Examples:</p>
  <pre>
            item region1 105
            item region7 0 2
            item region11 129 0
</pre>
  <h2>Specify Material Properties</h2>
  <p><i>\center mater comb [material]</i></p>
  <p>This command is used to change the material properties
  specification for a combination.</p>
  <h2>Edit Combination Record Info</h2>
  <p><i>\center edcomb comb regionflag regionid air los
  GIFTmater</i></p>
  <p>This command is used to change the material and the los
  percent for a region.</p>
  <h2>Edit (Display) an object on the screen</h2>
  <p><i>\center e obj1 obj2 ... objn</i></p>
  <p>This command allows one to display objects on the screen. In
  this case, "obj1" thru "objn" will be displayed on the
  screen.</p>
  <h2>Evaluated Display of Object on the screen</h2>
  <p><i>\center E obj1 obj2 ... objn</i></p>
  <p>This command is the same as the "e" command, except the
  regions will be evaluated before being displayed.</p>
  <h2>Zap screen and Display Object</h2>
  <p><i>\center B obj1 obj2 ... objn</i></p>
  <p>This command is the same as the "e" command, except that the
  screen is cleared (Zap) before the objects are displayed.</p>
  <h2>Kill (delete) object from database</h2>
  <p><i>\center kill obj1 obj2 ... objn</i></p>
  <p>This command allows one to remove objects from the file
  itself. Only the object records themselves are removed, any
  references made to these objects still will exist. To remove the
  references also, see the "killall" command.</p>
  <h2>List Table of Contents</h2>
  <p><i>\center t obj1 obj2 ... objn</i></p>
  <p>This is the table of contents command. If arguments are
  present, a list of all objects in the file matching these names
  will be printed. If there are no arguments, then a listing of all
  objects will be printed.</p>
  <h2>List Tree Tops</h2>
  <p><i>\center tops</i></p>
  <p>This command will search the target file hierarchy, and list
  all "top level" objects (objects which are not members of any
  other object). This command is useful to make sure objects have
  been grouped properly.</p>
  <h2>Make prototypical solid</h2>
  <p><i>\center make name type</i></p>
  <p>This command will create a solid of a specified type. This
  solid will be named "name" and the solid type will be "type". The
  acceptable types are: arb8, arb7, arb6, arb5, arb4, tor, tgc,
  tec, rec, trc, rcc, ellg, ell, sph. This new solid will be drawn
  at the center of the screen. This command should be used to
  create solids for editing.</p>
  <h2>Mirror ARB Face</h2>
  <p><i>\center mirface \#\#\#\# axis</i></p>
  <p>This command allows one to mirror a face of an edited arb
  about an axis. This command is quite useful for adding air to a
  "symmetric" target.</p>
  <h2>Print Summary of Objects</h2>
  <p><i>\center summary s|r|g</i></p>
  <p>This command will produce a summary of objects in the target
  file. If the options s, r, or g are entered a listing of the
  solids, regions, or groups will also be presented.</p>
  <h2>Specify Numeric Parameter(s)</h2>
  <p><i>\center p dx [dy dz]</i></p>
  <p>This is the parameter modification command and is used during
  solid editing to make precise changes. The actual meaning of the
  values typed after the "p", depend on what editing option is
  being performed. If one were translating a solid, then the values
  would be the x,y,z coordinates of the vertex of the solid.</p>
  <h2>Release Current Display</h2>
  <p><i>\center release</i> This command releases the current
  display device, and attaches the null device.</p>
  <h2>Attach to Display Device</h2>
  <p><i>\center attach device</i></p>
  <p>This command allows one to attach a display device (the
  present display device is released first). The present acceptable
  values for "device" are vg, mg, tek, rat, plot, tek4109, ir, sgi,
  and nu. The "plot" device will produce a UNIX-plot of the present
  view (including the faceplate) on a display device using a
  specific filter. You will be asked which filter to use. Sample
  filters include "tplot" and "plot-fb".</p>
  <h2>Numeric Object Rotation Edit</h2>
  <p><i>\center rotobj xdeg ydeg zdeg</i></p>
  <p>This command allows one to make precise rotations of an object
  during object editing. MGED must be in the "object edit" state
  for this command to have effect. If "object rotation" is not in
  effect, MGED will select this option for you and perform the
  rotation. The object will be rotated "xdeg" about the x-axis,
  "ydeg" about the y-axis, and "zdeg" about the z-axis. The
  rotation is "absolute"....the total rotation since the beginning
  of object editing will be equal to the input values. The rotation
  is done about the "KEY" point for the object being edited.</p>
  <h2>Scale Edited Object</h2>
  <p><i>\center scale xxx.xx</i></p>
  <p>This command allows one to make precise scaling changes to an
  object during object editing. MGED must be in the "object edit"
  state for this command to have effect. If one of the object scale
  options is not in effect, the "global scale" options will be
  selected. The object will be scaled by a TOTAL amount equal to
  the input value. If one of the local scale options is in effect,
  the object will be scaled in the selected axis direction by an
  amount equal to the input value. The scaling is done about the
  "KEY" point of the object being edited.</p>
  <h2>Translate Edited Object</h2>
  <p><i>\center translate xxx.xx yyy.yy zzz.zz</i></p>
  <p>This command allows one to make precise translation changes to
  an object during object editing. MGED must be in the "object
  edit" state for this command to have effect. If the object
  translation option is not in effect, this option will be selected
  and the translation performed. The "KEY" point of the object
  being edited will move to the input coordinates.</p>
  <h2>Fix Broken Hardware (sometimes)</h2>
  <p><i>\center fix</i></p>
  <p>This command will "fix" (restart) the display device after a
  hardware error.</p>
  <h2>Ray-Trace Current View</h2>
  <p><i>\center rt [-s\#]</i></p>
  <p>This command will run the <b>rt</b>(1) program to produce a
  color shaded image of objects on the currently selected
  framebuffer. The resolution of the image (number of rays) is
  equal to "\#" from the "-s" (square view resolution) option. If
  the -s option is absent, 50x50 ray resolution will be used.</p>
  <h2>Emulate Knob Twist</h2>
  <p><i>\center knob id value</i></p>
  <p>This command is used to emulate a "knob twist". Generally this
  command is used for display devices which have no actual knob
  peripherals (e.g. tek). Any non-zero number entered for "value"
  is converted to 1 (if "value" is greater than zero) or is
  converted to -1 (if "value is less than zero). The user must
  enter the same command with "value" equal to zero to stop the
  action invoked by the knob twist.</p>
  <p>The "id" defines which knob is to be "twisted":</p>
  <p>x</p>
  <td>rotates about x-axis y</td>
  <td>rotates about y-axis z</td>
  <td>rotates about z-axis X</td>
  <td>slew view in x direction Y</td>
  <td>slew view in y direction Z</td>
  <td>
    zoom the view
    <p>Examples:</p>
    <pre>
       knob x 1
       knob x 0
       knob Z -1
       knob Z 0
</pre>
    <h2>Solid\_Edit Named Solid</h2>
    <p>{\em\center sed name }</p>
    <p>This command allows one to immediately enter the solid edit
    mode with the solid "name" as the edited solid. Note that the
    solid must be displayed but not multiply referenced.</p>
    <h2>Illuminate Named Object</h2>
    <p>{\em\center ill name }</p>
    <p>This command is used to illuminate an object ... a path
    containing this object ("name") will be illuminated. This
    command is primarily used with display devices which do not
    have a tablet to pick objects for editing.</p>
    <h2>Rotate the View</h2>
    <p>{\em\center vrot xdeg ydeg zdeg }</p>
    <p>This command rotates the VIEW "xdeg" degrees about the
    screen x-axis, "ydeg" degrees about the screen y-axis, and
    "zdeg" degrees about the screen z-axis.</p>
    <p>This command is useful when the precise rotation desired is
    known. It is also useful when in a rotation edit mode, and the
    viewing rotation needs to be changed, without affecting the
    current edit.</p>
    <h2>Move Screen Center</h2>
    <p>{\em\center center xx.xx yy.yy zz.zz }</p>
    <p>This command moves the screen center to (xx.xx, yy.yy,
    zz.zz). Using this command is one way of slewing the view.</p>
    <h2>Set View Size</h2>
    <p>{\em\center size xx.xx }</p>
    <p>This command sets the view size to xx.xx and is one way of
    zooming the display. Making the view size smaller has the
    effect of zooming in on the view.</p>
    <h2>Extended List of all Objects in Displaylist</h2>
    <p>{\em\center x }</p>
    <p>This command produces a list of all objects displayed,
    listing the center of the object, its size, and if it is in the
    present view. It is intended primarily for software
    debugging.</p>
    <h2>Refresh Display</h2>
    <p>{\em\center refresh }</p>
    <p>This command will send a new display list to the display
    device.</p>
    <h2>Print View Status</h2>
    <p>{\em\center status }</p>
    <p>This is a debug command which prints the status of the
    current view, including all viewing and editing matrices.</p>
    <h2>Simulate Button Press</h2>
    <p>{\em\center press button-label }</p>
    <p>This command allows one to emulate a button press and is
    generally used on display devices which do not have actual
    button peripherals. The following are the strings allowed for
    "button-label" and all produce the indicated view on the device
    screen: top, bottom, right, left, front, rear, 90,90, 35,25</p>
    <p>The following is a listing of the remaining acceptable
    strings for "button-label" and the resulting action:</p>
    <p>reset & reset the view save & save the present view restore
    & restore the saved view adc & display the angle-distance
    cursor oill & begin object illumination (pick) sill & begin
    solid illumination (pick) oscale & object scale ox & object
    translation in x direction only oy & object translation in y
    direction only oxy & object translation orot & object rotation
    sedit & put up solid parameter menu srot & solid rotation sxy &
    solid translation sscale & solid scale accept & accept editing
    done reject & reject editing done</p>
    <p>Examples:</p>
    <pre>
         press 90,90
         press front
         press oill
         press orot
         press reject
</pre>
    <h2>Escape to the Shell</h2>
    <p>{\em\center <!--  -->
    }</p>
    <p>This command allows one to escape to the shell to perform
    multiple commands without having to terminate the current MGED
    session. To return to mged, enter a control-d to the Shell.
    Note that the "!" escape at the beginning of a line can be used
    to send a single command to the shell.</p>
    <h2>Get Short Help Listing</h2>
    <p>{\em\center ? }</p>
    <p>This is the short form of the help command, that lists the
    names of all MGED commands.</p>
    <h2>Get Long Help Listing</h2>
    <p>{\em\center help }</p>
    <p>This is the long form of the help command, that produces a
    listing of all the available commands and their arguments, and
    a one sentence summary of the commands purpose.</p>
    <h2>Exit (Quit) MGED</h2>
    <p>{\em\center q }</p>
    <p>Running the "q" command, or entering an End-Of-File (EOF)
    (typ. Control/D) is the normal way of exiting MGED.</p>
    <h2>Copy and Translate TGC</h2>
    <p><i>\center cpi oldtgc newtgc</i></p>
    <p>This command is a specialized copy command and is designed
    to be used when one is "running wires" in a description. The
    object being copied must a cylindrical solid (TGC). The
    following occurs when cpi is used: first the cylinder
    ("oldtgc") is copied to "newtgc"; then "newtgc" is translated
    to the end of "oldtgc"; then "newtgc" is displayed; and
    finally, MGED is put in the SOLID EDIT state with "newtgc" as
    the edited solid.</p>
    <h2>Remove Object and All References</h2>
    <p><i>\center killall obj1 obj2 ... objn</i></p>
    <p>This command will accomplish two things: first, the
    object[s] will be removed from the data file just as in the
    "kill" command; second, all references to the object[s] will
    also be removed.</p>
    <h2>Remove Complete Tree</h2>
    <p><i>\center killtree obj1 obj2 ... objn</i></p>
    <p>This command will remove from the file complete trees
    originating with obj1, obj2, ..., objn. Every object in the
    designated paths will be removed from the file, hence CAUTION
    is urged. Make sure that "killtree" is what you want to do.
    Using the "paths" or "tree" command on an object before
    "killtree" will show what objects will be killed.</p>
    <h2>Add Color To Display</h2>
    <p><i>\center color low high r g b string</i></p>
    <p>This command allows one to make color assignments to a range
    of item codes. The arguments "low" and "high" are the item
    ranges. The arguments "r", "g", and "b" are the red, green, and
    blue values respectively (the range of these numbers is
    generally 0-255). The argument "string" is a string describing
    this class of items. A blank is considered a terminator, so
    there can be no blanks in this string.</p>
    <h2>Edit Display Colors</h2>
    <p><i>\center edcolor</i></p>
    <p>This command allows one to edit the existing color
    assignments (table). The changes are made using the user's
    "selected" text editor found in environment variable EDITOR.
    Note that this method of specifying object colors is obsolete,
    and has been replaced by the <i>mater</i> command.</p>
    <h2>Print Display Colors</h2>
    <p><i>\center prcolor</i></p>
    <p>This command prints the color assignments as they presently
    exist.</p>
    <h2>Find Objects</h2>
    <p><i>\center find obj1 obj2 ... objn</i></p>
    <p>This command will find ALL references of obj1 obj2 ... objn
    in the file.</p>
    <h2>Estimate Presented Area</h2>
    <p><i>\center area [tolerance]</i></p>
    <p>This command finds an estimate of the presented area of all
    E'd objects in the present view from that aspect. The argument
    "tolerance" is the tolerance for the endpoints of line segments
    being "equal" and is optional.</p>
    <h2>Produce UNIX Plot</h2>
    <p><i>\center plot [-zclip] [-2d] [out-file] [| filter]</i></p>
    <p>This command is used to produce a UNIX-plot hardcopy of the
    present view of the 'geometry' on the display device. The MGED
    faceplate will not be drawn. Some useful examples are:</p>
    <p>plot-fb & LIBFB framebuffer (low res) plot-fb -h & LIBFB
    framebuffer (high res) tplot -Ti10 & Imagen laser printer tplot
    -Tmeg & Megatek 7250 tplot -T4014 & Tek4014 tplot -Thpgl &
    HP7550A plotter</p>
    <h2>Text Edit Solid Parameters</h2>
    <p><i>\center ted</i></p>
    <p>This command allows one to edit a solid's parameters using
    the text editor defined by the user's path. The solid being
    edited (solid edit mode) will be the one that will be "text
    edited".</p>
    <h2>Keyboard Input of Solid Parameters</h2>
    <p><i>\center in name type {parameters</i> }</p>
    <p>This command allows one to enter a new solid directly via
    the keyboard. The user will be prompted for any missing input
    and the solid will be displayed on the screen. WARNING: only
    minimal checking of parameters is done.</p>
    <h2>Change View Azimuth, Elevation</h2>
    <p><i>\center ae az elev</i></p>
    <p>This command sets the display viewing angles using the input
    azimuth (az) and elevation (elev) angles.</p>
    <h2>Define Region Identifiers</h2>
    <p><i>\center regdef item [air los mat]</i></p>
    <p>This command allows one to change the default codes which
    will be given to the next region created. If the "air" code is
    non-zero, then the "item" code will be set to zero.</p>
    <h2>Change Edge Direction</h2>
    <p><i>\center edgedir delta\_x delta\_y delta\_z</i></p>
    <p>This command allows one to define the direction of an ARB
    edge being moved. If only two arguments are input, the code
    assumes these to be the rotation and fallback angles for the
    edge. If three arguments are present, the code will use them as
    "deltas" to define the direction of the edge. Note that this
    command can be useful to find the intersection of a line (edge)
    with planes (faces).</p>
    <h2>Prefix Object Names</h2>
    <p><i>\center prefix string obj1 obj2 ... objn</i></p>
    <p>This command will prefix obj1, obj2, .... objn with
    "string". All occurrences of these names will be prefixed.
    String matching is allowed for the objects to prefix.</p>
    <h2>Keep Objects in Another File</h2>
    <p><i>\center keep file.g obj1 obj2 ... objn</i></p>
    <p>This command allows one to keep the listed objects in the
    file "file.g". This command is useful for pulling out parts of
    a description.</p>
    <h2>List Object Hierarchy</h2>
    <p><i>\center tree obj1 obj2 ... objn</i></p>
    <p>This command will print the tree structure for the objects
    listed.</p>
    <h2>Create Inside Solid</h2>
    <p><i>\center inside</i></p>
    <p>This command is used to define a solid (inside solid) such
    that when it is subtracted from another certain solid (outside
    solid), the resulting region will have desired thicknesses. To
    invoke this option, enter "inside". You will then be prompted
    for the required data. If you are in the solid edit mode, the
    "outside solid" will default to the solid presently being
    edited. If you are in the object edit mode, the "outside solid"
    will default to the "key solid" of the object path being
    edited. If you are not in an edit mode, you will then be asked
    for the name of the "outside solid". Next, you will be asked
    what name you wish to call the new "inside solid" to be
    calculated. Finally, you will be asked to enter the
    thickness[es], depending on the solid type. The "inside solid"
    will then be displayed on the screen. If the thickness values
    input are negative, then the thickness will be directed to the
    "outside" of the solid.</p>
    <h2>Produce ASCII Summary of Solids</h2>
    <p><i>\center solids file obj1 obj2 ... objn</i></p>
    <p>This command will produce an ascii summary of all solids
    involved with objects obj1, obj2, ..., objn. This summary will
    be written in 'file'. In this file, all regions and solids are
    numbered and will match the numbers of a COMGEOM deck produced
    by VDECK or GIFT if the objects are entered in the same order.
    The file 'file' will be overwritten if it already exists.
    String matching is allowed for the objects.</p>
    <h2>Produce ASCII Summary of Regions</h2>
    <p><i>\center regions file obj1 obj2 ... objn</i></p>
    <p>This command will produce an ascii summary table of all
    regions involved with objects obj1, obj2,...,objn. This summary
    table will be written in 'file'. In this file, all regions and
    solids will be numbered and will match the numbers of a COMGEOM
    description produced by VDECK or GIFT if the objects are
    entered in the same order. This file will be identical to the
    "solids" command except the actual parameters are not listed.
    The file 'file' will be overwritten if it already exists.
    String matching is allowed for the object names.</p>
    <h2>Produce ASCII Summary of Idents</h2>
    <p><i>\center idents file obj1 obj2 ... objn</i></p>
    <p>This command will produce an ascii summary table of all
    region idents involved with objects obj1, obj2,...,objn. This
    summary table will be written in 'file'. In this file, all
    regions will be numbered and will match the region numbers of a
    COMGEOM description produced by VDECK or GIFT if the objects
    are entered in the same order. At the end of this file will be
    the same region information, but ordered by ident number. The
    file 'file' will be overwritten if it already exists. String
    matching is allowed for the object names.</p>
    <h2>List Objects Paths</h2>
    <p><i>\center paths</i></p>
    <p>This command will print ALL paths matching an "input" path.
    You will be asked to enter the path to match. The path members
    are entered on ONE line, separated by spaces. The input path
    need not be a complete path, but must contain at least one
    object. All paths with the same first members as the input path
    will be listed. This command is useful for finding complete
    paths which begin with certain objects.</p>
    <h2>List Evaluated Path Solid</h2>
    <p><i>\center listeval</i></p>
    <p>This command will "evaluate" and list ALL paths matching an
    input path, including the parameters of the solids at the
    bottom of each path. These parameters will reflect any editing
    contained in the path listed. You will be asked to enter the
    path to match. The path members are entered on ONE line,
    separated by spaces. The input path need not be a complete
    path, but must contain at least one object. Note that since the
    solid parameters are printed, this could be a rather lengthy
    listing depending on the completeness of the input path.</p>
    <h2>Evaluate Path and Copy Solid</h2>
    <p><i>\center copyeval</i></p>
    <p>This command allows one to copy an "evaluated solid", that
    is a complete path ending in a solid. You will be asked to
    enter a complete path. Again, this path is entered on ONE line
    with the members separated by spaces. If you do not know the
    complete path, use the "paths" command above to find it. Next,
    you will be asked to enter the name of this copied solid. The
    input path will be traversed and the accumulated path
    transformations will be applied to the parameters of the bottom
    solid. These new parameters will then be the copied solid.
    Note: this command is useful for making "dummy solids" to
    subtract for overlaps between objects which have been "object"
    edited.</p>
    <h2>Edit Objects Region Identifiers</h2>
    <p><i>\center edcodes obj1 obj2 ... objn</i></p>
    <p>This command provides for an easy way to modify the code
    numbers (item, air, material, and los) of ALL regions found in
    paths beginning with an object. For each object, all paths
    beginning with that object are traversed until a region is
    encountered...at which time the following is listed:</p>
    <p>item air mat los /obj1/.../region.n</p>
    <p>The cursor then jumps back to "item" at the beginning of the
    line. At this time the cursor can be advanced only by entering
    a new item code (only digits are allowed) or by hitting the
    "space bar" or "tab key". The space and tab will move the
    cursor to the next position in the line. Pressing the
    "backspace key" will move the cursor to the beginning of the
    next location to the left. Moving the cursor "past" the los
    location will return it to the beginning of the line. When the
    code numbers are as you desire, a RETURN will print the next
    line for editing. At any time, pressing the "R" key will
    restore the idents on the current line to the way they were
    originally. A Control/C or a "q" will abort the process at the
    current line. String matching is allowed for the object
    names.</p>
    <h2>List Object As Stored</h2>
    <p><i>\center tab obj1 obj2 ... objn</i></p>
    <p>This command will produce a listing of objects as they are
    stored in the MGED object data file. String matching is allowed
    for the objects.</p>
    <h2>List Regions With Given Ident</h2>
    <p><i>\center whichid item1 item2 ... itemn</i></p>
    <p>This command will list ALL regions in the data file which
    have certain item codes.</p>
    <h2>Create ARB Given 3 Points</h2>
    <p><i>\center 3ptarb</i></p>
    <p>This command will produce a "plate mode" arb8 given 3 points
    on one face, 2 coordinates of the 4th point on that face, and a
    thickness. The 3rd coordinate of the 4th point will be solved
    for and the "other" face will be a normal distance (== the
    desired thickness) away. You will be asked for all necessary
    input.</p>
    <h2>Create ARB Given Point and Angles</h2>
    <p><i>\center rfarb</i></p>
    <p>This command will produce a "plate mode" arb8 given a point
    on one face, rotation and fallback angles for that face, 2
    coordinates of the 3 remaining points on that face, and a
    thickness. The 3rd coordinates of the three points will be
    solved for, and the other face will be a normal distance equal
    to "thickness" away. You will be asked for all necessary
    input.</p>
    <h2>Push Editing Down Paths</h2>
    <p><i>\center push obj1 obj2 ... objn</i></p>
    <p>This command will "push" an object's path transformations to
    the solid's parameters located at the bottom of each path. If a
    conflict is encountered, then an error message is printed and
    NOTHING is done. A conflict occurs when the same solid "ends"
    different paths but the transformations are different.
    Conflicts could occur when "instanced" or "copied" groups occur
    in an object's paths or when a solid is a member of 2 regions
    which have been edited separately. A complication of this
    command, which will not be listed as a conflict, is when a
    solid's parameters have been changed by a push, yet this solid
    is referenced by another object which was NOT included in the
    push. The user should beware of this situation. This command
    can be very useful when "adding" parts from another file. Once
    the "object editing" of these new parts is completed, the push
    command will put the editing done to the solid level. Since the
    added parts should have no cross-references with the existing
    objects, there should be no problems.</p>
    <h2>Check For Duplicate Names</h2>
    <p><i>\center dup file.g {string</i> }</p>
    <p>This command will compare the current object data file with
    another MGED file "file.g" and list any object names common to
    both files. If "string" is present, all object names in
    "file.g" will be prefixed with "string" before comparing for
    duplicate names. Generally, one uses "string" only when
    duplicate names are found without it.</p>
    <h2>Concat Files</h2>
    <p><i>\center concat file.g {string</i> }</p>
    <p>This command will concatenate another MGED file "file.g"
    onto the present object data file. If "string" is present, all
    names in "file.g" will be prefixed with this string. No objects
    from "file.g" will be added if the name already occurs in the
    current object file...the object names will be listed and
    skipped. However, this command should be used in conjunction
    with the "dup" command to eliminate any problems with duplicate
    names.</p>
    <h2>Create Pseudo-Track</h2>
    <p><i>\center track</i></p>
    <p>This command adds track components to the data file to fit
    specified "wheel" data. Solids, regions, and a group containing
    the regions will be created and displayed on the screen. You
    will be prompted for all required data.</p>
    <h2>Define ARB Face</h2>
    <p><i>\center facedef \#\#\#\#</i></p>
    <p>This command is used to define the face plane of an ARB that
    is being edited. The following is the option menu displayed
    when this command is used: a planar equation b 3 points c rot
    and fb angles + fixed point d same plane thru fixed point q
    quit To select any of these methods of defining a plane, enter
    the appropriate letter. You will then be asked for the desired
    input.</p>
    <h2>Define Plane Equation of ARB Face</h2>
    <p><i>\center eqn [A B C]</i></p>
    <p>This command is used when one is rotating the face of an
    edited ARB and defines the coefficients of the face planar
    equation (Ax + By + Cz).</p>
    <h2>Move (Rename) Everywhere</h2>
    <p><i>\center mvall old new</i></p>
    <p>This command is used to rename all occurrences of an object
    in the data file. In this case, the object "old" will be
    renamed "new" for every occurrence.</p>
    <h2>Miscellaneous Commands</h2>
    <p>It is possible to view, specify, and text-edit information
    pertaining to the material type and color of various parts of
    the model tree. This is an interim capability intended to
    provide enough material properties information for current
    rendering and analysis purposes until the design of a full
    material properties database can be finalized.</p>
    <p>In addition to a variety of usual database manipulation and
    status commands, there are commands to compare the current
    database for name overlap (conflicts) with another database, as
    well as commands to import and export subtrees to/from the
    current database. If name conflicts between the two databases
    do exist, there are commands to rename an individual node
    without changing any of the references to it (``mv''), or to
    rename a node and change all the references to it (``mvall'').
    Another command which is useful for preparing to move subtrees
    between databases is the ``push'' command, which adjusts the
    transformation matrices from the indicated point down to the
    leaves of the directed acyclic graph, leaving the higher level
    arcs with identity matrices.</p>
    <h2>UNIX-Plot Output</h2>
    <p>The ``plot'' command can store an exact image of the current
    (non-faceplate) display on the screen, either using the System
    V standard 2-D monochrome UNIX-Plot (<i>plot(4)</i>) format, or
    the BRL 3-D color extended-UNIX-Plot format. These plots can be
    sent to a disk file, or ``piped'' directly to a filter process.
    This can be useful for making hard copies of the current MGED
    view for showing to others, using a local pen plotter or laser
    printer.</p>
    <h2>Ray-Tracing the Current View</h2>
    <p>An important capability even beyond the ability to generate
    an evaluated boundary wireframe is the ability of MGED to
    initiate a quick ray-trace rendering of the current view on any
    nearby framebuffer! This is implemented by using the MGED
    ``rt'' command to fork off an instance of the RT program, and
    sending the RT program a description of the current view with
    any user-specified options. This allows the designer to use the
    power of MGED to select the desired view, and then to quickly
    verify the geometry and light source placement. A 50 by 50
    pixel rendering of the current view can usually be done in less
    than a minute (on a DEC VAX-780 class processor), and allows
    for general verification before the designer uses the
    ``saveview'' command to submit a batch job for a high
    resolution ray-trace of the same view.</p>
    <h2>Animation</h2>
    <p>The MGED editor includes a number of features which are
    useful for developing animation tools and scripts. The full
    description of the current viewing transformation and eye
    position can be saved in a file, and such a previously saved
    view can be read back at any time, immediately changing the
    editor's view. In addition, the current viewing transformation
    and eye position can be appended to a file containing a
    collection of keyframes. Most importantly, a file full of
    keyframe information, either raw keyframe positions or smoothly
    interpolated keyframe sequences, can by ``played'' in real time
    using MGED, providing a powerful and fast animation preview
    capability.</p>
    <p>As a separate animation capability intended for developing
    demonstrations and instructional material relating to the use
    of the MGED editor, all user interactions with the editor can
    be recorded in a file, along with an indication of the time
    elapsed between user actions. This file can be adjusted using a
    normal text editor to remove any errors, or to eliminate dead
    time where the user stopped to think. Once created, this
    session script can be replayed through the editor at any time,
    either to provide a smooth ``canned'' demonstration before a
    live audience, or to create a film or videotape.</p>
    <h1>TUTORIALS ON VIEWING AND STATES</h1>
    <p>Tutorials with illustrations are provided to give the MGED
    user a step-by-step walk-through of the basic capabilities of
    the graphics editor. Standard UNIX login and logout procedures
    appropriate to each site should be followed prior to beginning
    and after ending the tutorials.</p>
    <p>Each of the tutorials will use the solids contained the MGED
    database called ``prim.g''. These can be obtained by making a
    copy of ``db/prim.g'' from the BRL-CAD Package distribution
    tree. It is important to make a copy of the database and work
    with that, rather than using the supplied one. Changes made
    during the editing process are written to the database when
    they are {\sl accepted}.</p>
    <p>The first tutorial shows a sample invocation dialogue. All
    other tutorials start at the first MGED prompt ({\tt mged&gt;
    }). If the user wishes to continue from one tutorial to the
    next without leaving MGED, issue the <i>press reject</i> and
    <i>press reset</i> commands before starting a new tutorial.
    User input will be shown in an <i>emphasized</i> font, and MGED
    output will appear in a {\tt typewriter} font. If the user
    input is shown on the same line as a prompt, the input is
    literal. If the user input is shown on a line by itself, it is
    a directive, and is entered in an appropriate fashion.</p>
    <p>The tutorials are self-contained, and if the user wishes to
    proceed to the next tutorial without exiting MGED, the RESET
    button should be pressed to return to the top view, where the
    model XYZ axes map to the screen XYZ axes.</p>
    <p>The standard recovery procedure when in the middle of an
    editing operation is to select REJECT edit. Control is returned
    to the viewing state, and the user can restart with the last
    edit (e) command used in the tutorial.</p>
    <h2>States Within the Edit Process</h2>
    <p>In this tutorial, the user will invoke MGED on a file called
    ``prim.g''; attach a {\sl display manager\/}; explore the
    various MGED states; and finally, exit MGED. A MGED database
    has a treelike structure. The leaves are the individual solids,
    and the other nodes are groupings of those solids. The solid
    editing functions are concerned with defining and modifying the
    leaves, and the object editing functions operate on groups,
    which are Boolean combinations of solids. One useful mental
    model is to envision solid editing as operating directly on a
    leaf and object editing as operating on the arc connecting a
    pair of nodes. The object edit will affect everything below the
    selected arc (this is why there is an additional state
    transition when object editing).</p>
    <h2>Viewing State</h2>
    <p>The first task is to invoke MGED. This tutorial will assume
    the user has a copy of the ``prim.g'' database in the current
    directory.</p>
    <p>\noindent {\tt \$ }<i>mged prim.g</i> {\tt BRL-CAD Release
    3.0 Graphics Editor (MGED) Compilation 82} {\tt Thu Sep 22
    08:08:39 EDT 1988} {\tt mike@video.brl.mil:/cad/.mged.4d2}</p>
    <p>\noindent {\tt attach (nu|tek|tek4109|ps|plot|sgi)[nu]?
    }<i>sgi</i> {\tt ATTACHING sgi (SGI 4d)} {\tt Primitive Objects
    (units=mm)} {\tt mged&gt; }</p>
    <p>The first three lines give information about which version
    of MGED is running, when it was compiled, and who compiled it.
    The next line is the display manager attach prompt. This prompt
    provides a list of available display managers, then shows what
    the default will be (selected if the user answers with a
    carriage return). In this case, the Silicon Graphics 4d display
    manager was selected, as is noted by the following line. Next
    the title of the database and the unit of measurement used in
    the database are printed, and finally, the first prompt is
    issued. At this point MGED has loaded ``prim.g''; attached the
    SGI display; and is awaiting commands. Attaching a display also
    causes what is known as the MGED {\sl faceplate} to be drawn on
    the graphics display.</p>
    <p>The faceplate has several features of interest. In the upper
    left corner of the display, is a box which always shows the
    current MGED {\sl state}. This can be one of six states:
    <b>VIEWING</b>, <b>SOL PICK</b>, <b>SOL EDIT</b>, <b>OBJ
    PICK</b>, <b>OBJ PATH</b>, or <b>OBJ EDIT</b>.</p>
    <p>Immediately below, is the menu area. The only menu item
    initially shown is one labeled <b>BUTTON MENU</b>. This menu
    item toggles the display of the button menu entries when {\sl
    selected} (more on selection later).</p>
    <p>At the bottom of the display are two status lines. The first
    line contains information about the current view. The entry
    labeled <b>cent=</b> gives the {\sl model space} coordinates of
    the dot in the center of the display. The entry labeled
    <b>sz=</b> reflects the current size in model units of the {\sl
    viewing cube}. The viewing cube is a mathematical construct
    centered on the dot in the center of the display. The
    <b>ang=</b> display shows the current rate of rotation in each
    of the three axes. The bottom line is used for several kinds of
    information. In the <b>VIEWING</b> state, it displays the title
    of the database.</p>
    <p>The MGED viewing features are designed to allow the user to
    examine models at different angles. Preset views can be invoked
    at anytime by using either the menu or the button box.
    Selecting a preset view does not change the coordinates of the
    primitives, but instead changes the angle from which these
    primitives are displayed. Five standard views (top, right,
    front, 35/25, and 45/45) can be obtained by using either the
    bottom menu on the display screen or the control box. Three
    additional views (button, left, and rear) can be obtained by
    using the button box, but not by using the menu.</p>
    <p>The normal or default viewing state is the ``top''
    orientation, with model +X pointing towards the right of the
    screen, model +Y pointing towards the top of the screen, and
    model +Z pointing out of the screen. In the ``top'' view, the
    model and screen axes are the same. The ``reset'' button and
    ``Reset Viewsize'' menu items also result in a ``top''
    view.</p>
    <p>The following table shows the angles of rotation to obtain
    the other views.</p>
    <p>View & Angle of Rotation (from top) Top & 0, 0, 0 Bottom &
    180, 0, 0 Right & 270, 0, 0 Left & 270, 0, 180 Front & 270, 0,
    270 Rear & 270, 0, 90 35, 25 & 295, 0, 235</p>
    <p>\noindent {\tt mged&gt;\ }<i>e arb8</i> {\tt vectorized in 0
    sec} {\tt mged&gt;\ }<i>size 12</i> {\tt mged&gt; }</p>
    <div class="c1">
      <img src="t1-top-vw.gif" alt="t1-top-vw"> <b>``arb8'' Top
      View.</b>
    </div>The <b>e</b> command causes the named object(s) -- a
    solid named ``arb8'' in this case -- to be displayed, and the
    <b>size</b> command sets the size of the viewing cube. Figure
    <a href="#t1-top-vw">t1-top-vw</a> shows what the display
    currently looks like. In this view, the X-axis is to the right,
    the Y-axis points up, and the Z-axis is perpendicular to
    (poking out of) the screen.
    <p>\noindent <i>Twist the <b>Y ROT</b> knob clockwise and
    back.</i> <i>Twist the <b>X ROT</b> knob counterclockwise and
    back.</i></p>
    <p>These knobs, along with the <b>Z ROT</b> knob, rotate the
    viewing cube. Use of the rotation knobs allows the user to view
    the model from any orientation. Turning a knob clockwise causes
    a rotation in the positive direction, while turning a knob
    counterclockwise causes a negative rotation (right-hand rule).
    The knobs are rate based, not position based; once a rotation
    has been started, it will continue until the knob is returned
    to zero (or the <b>zeroknobs</b> button is pressed). Rotations
    are about the viewing cube (screen) axes, not the model axes.
    Systems without knobs can use the <b>knob</b> command.</p>
    <p>\noindent <i>Move the mouse (or pen) until the cursor is in
    the <b>BUTTON MENU</b> block and then press the middle mouse
    button (depress the pen).</i></p>
    <div class="c1">
      <img src="t1-rot-vw.gif" alt="t1-rot-vw"> <b>``arb8'' Rotated
      View.</b>
    </div>Pressing the middle mouse button (or the pen) {\sl
    selects} something. When the cursor is inside the menu area, a
    selection causes the event described by the menu item to occur.
    Selecting <b>BUTTON MENU</b> causes the button menu to appear
    on the left side of the screen. The <b>BUTTON MENU</b> menu
    item is a toggle; subsequent selection of this item will cause
    the button menu to disappear. Figure <a href=
    "#t1-rot-vw">t1-rot-vw</a> shows the new display.
    <p>\noindent <i>Move the cursor from the menu area to a point
    near the upper left corner of the solid and select it (press
    the center mouse button).</i></p>
    <p>In the <b>VIEWING</b> state, making a selection while
    outside of the menu area will move the selected point to the
    center of the display. Look carefully at the center of the
    display; the point just selected is now located at the center
    dot. Use the <b>center</b> command to reset any translations
    made with the mouse.</p>
    <p>\noindent {\tt mged&gt; }<i>center 0 0 0</i> {\tt mged&gt;
    }</p>
    <p>From the <b>VIEWING</b> state, the user will normally
    transition to either the <b>SOL PICK</b> or <b>OBJ PICK</b>
    state. The <b>SOL PICK</b> state is selected by:</p>
    <ul>
      <li>Selecting the <b>Solid Illum</b> button menu entry,
      or,</li>
      <li>Pressing the <b>sill</b> button (this button may be
      labeled using some variation of ``Solid Illum''), or,</li>
      <li>Typing <b>press sill</b>.</li>
    </ul>Similar entries (<b>Object Illum</b>) and (<b>oill</b>)
    exist for transitioning into the <b>OBJ PICK</b> state. In
    general, the <b>press</b> command is the basic mechanism (type
    <b>press help</b> for a list of available commands). Most of
    the press commands have been mapped onto a button box if it is
    available, and some of the most common are also mapped into the
    <b>BUTTON MENU</b> so they can accessed without letting go of
    the mouse.
    <h2>Solid Pick State</h2>
    <p>\noindent <i>Place MGED in the <b>SOL PICK</b> state using
    one of the above mechanisms.</i></p>
    <div class="c1">
      <img src="t1-sol-pk.gif" alt="t1-sol-pk"> <b>MGED In Solid
      Pick State.</b>
    </div>Upon entering the <b>SOL PICK</b> state, the display will
    look similar to Figure <a href="#t1-sol-pk">t1-sol-pk</a>. The
    <b>SOL PICK</b> state used to select which of the displayed
    solids is to be edited. Note that the color of the solid has
    changed from red to white. The screen is divided into as many
    horizontal zones as there are solids displayed, and each zone
    is assigned to one solid. As the mouse is moved vertically
    through each zone, the corresponding solid is highlighted
    (``illuminated'') by drawing it in white. In this instance,
    there is only one solid being displayed, so this state is
    relatively uninteresting. If the system being used has no
    mouse, there is no reason to enter the <b>SOL PICK</b> state.
    The user will instead transition directly to the <b>SOL
    EDIT</b> state using the <b>sed</b> command.
    <p>\noindent {\tt mged&gt; }<i>press reject</i> {\tt mged&gt;
    }<i>e ellg</i> {\tt mged&gt; } <i>Press the <b>sill</b>
    button</i></p>
    <div class="c1">
      <img src="t1-2s-pk.gif" alt="t1-2s-pk"> <b>MGED In Solid Pick
      with Two Solids.</b>
    </div>Note that the first action taken was to {\sl reject} the
    edit. Any time MGED is not in the <b>VIEWING</b> state, a {\sl
    reject} command (via <b>press</b>, button, or mouse) discards
    all editing changes accumulated since the last transition out
    of the <b>VIEWING</b> state, and places MGED in the
    <b>VIEWING</b> state. The display should now look similar to
    Figure <a href="#t1-2s-pk">t1-2s-pk</a>. Notice that one solid
    is white and the name of that solid is displayed in the upper
    left corner of the display, as well as in the bottom status
    line. The solid to be edited is selected by moving the mouse up
    and down until the zone corresponding to the desired solid is
    reached. Once the appropriate zone is reached, select it. This
    selects a solid, and once a solid is selected, MGED enters the
    <b>SOL EDIT</b> state.
    <h2>Solid Edit State</h2>
    <p>\noindent {\tt mged&gt; }<i>d ellg</i> {\tt mged&gt; }
    <i>Select the solid called ``arb8''.</i></p>
    <div class="c1">
      <img src="t1-sol-ed.gif" alt="t1-sol-ed"> <b>Solid Edit
      State.</b>
    </div>The <b>d</b> command removes something from the display.
    In this case, the solid ``ellg'' was removed to reduce clutter.
    The display should now look like Figure <a href=
    "#t1-sol-ed">t1-sol-ed</a>. When MGED enters the solid edit
    state, the following occurs:
    <ul>
      <li>The solid selected for editing remains illuminated,</li>
      <li>The solid is labeled,</li>
      <li>The coordinates (or dimensions) associated with the
      labels, and other information is displayed to the right of
      the menu area,.</li>
      <li>If the solid is a member of one or more groups, a similar
      set of coordinates called the {\sl PATH} is displayed
      immediately below the first set of coordinates,</li>
      <li>The <b>*SOLID EDIT*</b> menu is displayed, and,</li>
      <li>A solid specific edit menu (in this case the <b>ARB
      MENU</b>) is displayed.</li>
    </ul>
    <p>The <b>*SOLID EDIT*</b> menu provides access to generic
    operations (translation, rotation and scaling) common to all
    solids. The solid specific edit menu is a list of solid type
    specific editing operations. Selecting one of the solid
    specific edit menus causes a submenu with solid type specific
    choices to be displayed. To remove this submenu, select either
    the <b>RETURN</b> item in the submenu, or the <b>edit menu</b>
    item in the <b>*SOLID EDIT*</b> menu.</p>
    <p>It is in this state that the solid is altered to meet the
    modeler's requirements. The shape, positioning, and orientation
    of the solid is changed using numeric keyboard input,
    positioning of the mouse, or by use of the knobs. Once the
    solid has been altered, the edit is either accepted or
    rejected. Accepting the edit causes all changes made to be
    written to the database; rejecting the edit ``throws them
    away''. Either operation will terminate the edit session and
    return MGED to the <b>VIEWING</b> state.</p>
    <p>\noindent <i>Reject the edit.</i></p>
    <h2>Object Pick State</h2>
    <p>\noindent <i>Place MGED in the <b>OBJ PICK</b>
    state.</i></p>
    <div class="c1">
      <img src="t1-obj-pk.gif" alt="t1-obj-pk"> <b>Object Pick
      State.</b>
    </div>Figure <a href="#t1-obj-pk">t1-obj-pk</a> shows what the
    display looks like when in the <b>OBJ PICK</b> state. As with
    the <b>SOL PICK</b> state, a single solid is selected. This
    solid becomes the reference solid for the object edit. In the
    <b>OBJ PICK</b> state, the solid will be shown as a member of
    one or more objects. Less obvious is the fact that the local
    axes associated with the selected solid are the axes used for
    the entire object during the object edit.
    <h2>Object Path State</h2>
    <p>\noindent <i>Select ``arb8''.</i></p>
    <div class="c1">
      <img src="t1-obj-ph.gif" alt="t1-obj-ph"> <b>Object Path
      Selection State.</b>
    </div>MGED transitions into the <b>OBJ PATH</b> state once a
    solid has been picked from <b>OBJ PICK</b>. Figure <a href=
    "#t1-obj-ph">t1-obj-ph</a> is the display in the <b>OBJ
    PATH</b> state. When in this state the extent of the editing
    operation is set. Everything below the editing point is
    affected by the edit. The editing point is shown by the {\sl
    MATRIX} label in the display. It is shown as <b>[MATRIX]</b> in
    the upper left part of the display and as <b>\_\_MATRIX\_\_</b>
    in the second status line. The editing point is chosen with the
    same mechanism used by <b>SOL PICK</b> and <b>OBJ PICK</b>.
    This time, there is one horizontal zone for each node in the
    path between the root and selected leaf. Moving the mouse up
    and down moves the editing point up and down in the tree. Once
    again, having a simple database and only one object in view
    makes for a relatively uninteresting situation.
    <h2>Object Edit State</h2>
    <p>\noindent <i>Select the editing point above
    ``arb8''.</i></p>
    <div class="c1">
      <img src="t1-obj-ed.gif" alt="t1-obj-ed"> <b>Object Edit
      State.</b>
    </div>MGED is now in the <b>OBJ EDIT</b> state and the display
    should look like Figure <a href="#t1-obj-ed">t1-obj-ed</a>.
    When MGED enters the object edit state, the following occurs:
    <ul>
      <li>The reference solid remains illuminated,</li>
      <li>The reference solid is labeled,</li>
      <li>The information associated with the labels is displayed
      to the right of the menu area, and</li>
      <li>The <b>*OBJ EDIT*</b> menu is displayed.</li>
    </ul>
    <p>The <b>OBJ EDIT</b> state is used to modify the Homogeneous
    Transform Matrix selected during the <b>OBJ PATH</b> state.
    Permissible operations include uniform and affine scaling of
    the objects, as well as translation and rotation. As with the
    <b>SOL EDIT</b> state, MGED accepts changes entered using the
    keyboard, mouse or knobs.</p>
    <p>This concludes the first tutorial. Examples of the
    appearance of MGED in each of the six states have been given,
    along with some idea of what each of the states is used for.
    All that remains is to reject the current edit, and exit MGED.
    Strictly speaking the <b>q</b> command could be entered
    directly, but doing so, can become a dangerous habit.</p>
    <p>\noindent <i>Select <b>REJECT Edit</b> using the mouse.</i>
    <i>Press the <b>reject</b> button.</i> {\tt mged&gt; }<i>d
    arb8</i> {\tt mged&gt; }<i>q</i> {\tt \$ }</p>
    <h2>Editing in the Plane of the Screen</h2>
    <div class="c1">
      <img src="plane-top1.gif" alt="plane-top1"> <b>A Top View of
      the Coordinate Axes.</b>
    </div>
    <p>When MGED is in a ``translate'' mode within an edit state,
    the plane of the mouse or data tablet is mapped to the plane of
    the screen, to permit moving objects in a controlled way in two
    of the three available dimensions. The orientation of the plane
    of the screen is determined by the currently selected view. In
    most circumstances, users will find that repositioning objects
    is easiest when the plane of the screen is oriented in an
    axis-aligned view. This is most easily accomplished by
    utilizing one of the preset views. For this exercise, obtain a
    copy of the <i>axis.g</i> database, and run MGED, e.g.:</p>
    <p>\noindent{\tt \$ cp cad/db/axis.g . \$ mged axis.g BRL-CAD
    Release 3.0 Graphics Editor (MGED) Compilation 82 Thu Sep 22
    08:08:39 EDT 1988 mikel@video.br:/cad/.mged.4d2 attach
    (nu|tek|tek4109|ps|plot|sgi)[nu]? <i>sgi</i> ATTACHING sgi (SGI
    4d) X,Y,Z Coordinate Axis (units=none) mged&gt; <i>e axis</i>
    vectorized in 0 sec <i>Select ``Top'' in the Button menu</i>
    mged&gt; }</p>
    <h3>Top View</h3>
    <div class="c1">
      <img src="plane-top2.gif" alt="plane-top2"> <b>Translating
      from the Top View.</b>
    </div>
    <p>The top view is the default view. The orientation of the
    axes is shown in Figure <a href="#plane-top1">plane-top1</a>.
    The surface of the viewing screen and the graphics tablet is
    the XY plane. Edit changes using the graphics tablet will
    affect only the X and Y coordinates of the primitive.</p>
    <p>\noindent{\tt mged&gt; <i>sed x</i> <i>Select ``Translate''
    in the Solid Edit menu</i> mged&gt; }</p>
    <p>Select different points on the tablet with the mouse, each
    time pressing the middle mouse button. Notice how the X and Y
    coordinates of the V vector change, but the Z coordinate does
    not. An example of this is shown in Figure <a href=
    "#plane-top2">plane-top2</a>; compare the values of V with
    those in Figure <a href="#plane-top1">plane-top1</a>.</p>
    <p><i>Select ``REJECT Edit'' in the Button menu</i></p>
    <h3>Bottom View</h3>
    <div class="c1">
      <img src="plane-bot1.gif" alt="plane-bot1"> <b>A Bottom View
      of the Coordinate Axes.</b>
    </div>
    <div class="c1">
      <img src="plane-bot2.gif" alt="plane-bot2"> <b>Translating
      from the Bottom View.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>press bottom</i> mged&gt; <i>sed
    x</i> <i>Select ``Translate'' in the Solid Edit menu</i>
    mged&gt; }</p>
    <p>The <i>press bottom</i> command selects the bottom view of
    the model, and the new configuration of the axes can be seen in
    Figure <a href="#plane-bot1">plane-bot1</a>. The surface of the
    viewing screen and the mouse or tablet are still in the XY
    plane. Edit changes using the graphics tablet will affect only
    the X and Y components of the solid. Select different points on
    the tablet with the mouse and notice the changes in the
    coordinates; compare the values of V with those in Figure
    <a href="#plane-bot2">plane-bot2</a>.</p>
    <p><i>Select ``REJECT Edit'' in the Button menu</i></p>
    <h3>Right View</h3>
    <div class="c1">
      <img src="plane-right1.gif" alt="plane-right1"> <b>A Right
      View of the Coordinate Axes.</b>
    </div>
    <div class="c1">
      <img src="plane-right2.gif" alt="plane-right2">
      <b>Translating from the Right View.</b>
    </div>
    <p>\noindent{\tt <i>Select ``Right'' in the Button menu</i>
    mged&gt; <i>sed x</i> <i>Select ``Translate'' in the Solid Edit
    menu</i> mged&gt; }</p>
    <p>The right hand view has been selected. Model +X still
    proceeds to the right, but now model +Z is at the top of the
    screen, and model +Y is pointing out of the screen. This new
    configuration is depicted in Figure <a href=
    "#plane-right1">plane-right1</a>. The surface of the viewing
    screen and the graphics tablet is the XZ plane. Edit changes
    using the graphics tablet will affect only the X and Z
    coordinates of the solid. Select different points on the tablet
    with the mouse and notice the changes in the V coordinates;
    only the X and Z components change, as in Figure <a href=
    "#plane-right2">plane-right2</a>.</p>
    <p><i>Select ``REJECT Edit'' in the Button menu</i></p>
    <h3>Front View</h3>
    <div class="c1">
      <img src="plane-front1.gif" alt="plane-front1"> <b>A Front
      View of the Coordinate Axes.</b>
    </div>
    <div class="c1">
      <img src="plane-front2.gif" alt="plane-front2">
      <b>Translating from the Front View.</b>
    </div>
    <p>\noindent{\tt <i>Select ``Right'' in the Button menu</i>
    mged&gt; <i>sed x</i> <i>Select ``Translate'' in the Solid Edit
    menu</i> mged&gt; }</p>
    <p>The front view has been selected. Model +X points out of the
    screen, model +Y points to the right, and model +Z points
    towards the top of the screen, as shown in Figure <a href=
    "#plane-front1">plane-front1</a>, which has been slightly
    rotated off the preset view to improve the legibility of the
    axis labels. The surface of the viewing screen and the graphics
    tablet is the YZ plane. Edit changes will affect only the Y and
    Z coordinates of the primitive, as shown in Figure <a href=
    "#plane-front2">plane-front2</a>. Select different points on
    the tablet with the mouse and notice the changes in the
    coordinates.</p>
    <p><i>Select ``REJECT Edit'' in the Button menu</i></p>
    <h3>35, 25 View</h3>
    <div class="c1">
      <img src="plane-35a.gif" alt="plane-35a"> <b>An Oblique 35,25
      View of the Coordinate Axes.</b>
    </div>
    <div class="c1">
      <img src="plane-35b.gif" alt="plane-35b"> <b>Translating in
      the 35,25 View.</b>
    </div>
    <p>\noindent{\tt <i>Select ``35,25'' in the Button menu</i>
    mged&gt; <i>sed x</i> <i>Select ``Translate'' in the Solid Edit
    menu</i> mged&gt; }</p>
    <p>Figure <a href="#plane-35a">plane-35a</a> is the 35,25 view
    of the axes model. The axes are no longer parallel or
    perpendicular to the viewing surface or to the graphics tablet.
    Edit changes using the graphics tablet will affect all of the
    coordinates of the solid, in a manner that is visually
    intuitive when the solid is moved around on the screen. Select
    different points on the tablet with the mouse and notice the
    changes in the coordinates, such as in Figure <a href=
    "#plane-35b">plane-35b</a>. Note how all three components of
    the V vector have changed.</p>
    <p><i>Select ``REJECT Edit'' in the Button menu</i></p>
    <h1>TUTORIALS ON EDITING SOLIDS</h1>
    <p>The Solid Editing state of MGED is used to modify the
    fundamental parameters of an individual solid. Each solid must
    be modified individually.</p>
    <h2>Solid Edit: A Six-Sided Polyhedron</h2>
    <div class="c1">
      <img src="es8-top.gif" alt="es8-top"> <b>Top View of
      ARB8.</b>
    </div>
    <p>This section illustrates the use of commands while in SOL
    EDIT state to alter the shape of a polyhedron with six sides
    and 8 faces (ARB8).</p>
    <p>\noindent{\tt \$ <i>mged es.g</i> BRL-CAD Release 3.0
    Graphics Editor (MGED) Compilation 82 Thu Sep 22 08:08:39 EDT
    1988 mike@video.brl:/cad/.mged.4d2 es.g: No such file or
    directory Create new database (y|n)[n]? <i>y</i> attach
    (nu|tek|tek4109|ps|plot|sgi)[nu]? <i>sgi</i> ATTACHING sgi (SGI
    4d) Untitled MGED Database (units=mm) mged&gt; <i>in arb8 rpp
    -1 1 -1 1 -1 1</i> mged&gt; <i>size 10</i> mged&gt; }</p>
    <p>Figure <a href="#es8-top">es8-top</a> is a top view of the
    six-sided polyhedron. The Z-axis perpendicular to the viewing
    screen. Next, the view is rotated so that all sides can be
    seen.</p>
    <p>\noindent{\tt mged&gt; <i>Twist ROTY knob clockwise and
    restore</i> mged&gt; <i>Twist ROTX knob counter-clockwise and
    restore</i> mged&gt; }</p>
    <div class="c1">
      <img src="es8-rot.gif" alt="es8-rot"> <b>A Rotated View of
      the ARB8.</b>
    </div>Figure <a href="#es8-rot">es8-rot</a> shows a better
    perspective of the solid.
    <p>The next step in this tutorial is to transfer to the solid
    edit state. This can be accomplished in two ways: either by
    going through the SOL PICK state (``illuminate mode'') or by
    direct transfer via keyboard command. Using illuminate mode is
    better when the name of the solid to be edited may not be
    known, while the keyboard command is generally preferred when
    the name of the solid is known.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``Solid Illum'' entry
    in the button menu</i> mged&gt; <i>Move the mouse out of the
    menu area</i> mged&gt; <i>Click the mouse to enter SOL EDIT
    state</i> mged&gt; }</p>
    <p>To perform a direct transfer from the viewing state to the
    solid edit state using a keyboard command, enter:</p>
    <p>\noindent{\tt mged&gt; <i>sed arb8</i> mged&gt; }</p>
    <div class="c1">
      <img src="es8-sed.gif" alt="es8-sed"> <b>An ARB8 in Solid
      Edit State.</b>
    </div>Figure <a href="#es8-sed">es8-sed</a> corresponds to the
    view on the display. The ARB8 MENU is unique to the ARB
    primitive, and lists operations that can only be performed on
    an ARB solid. The items in the ARB8 MENU are selected by using
    the mouse. Each of the other types of solids have a similar
    unique menu. When one of these items is selected, the top level
    ARB8 MENU disappears, to be replaced with the indicated
    subordinate menu. The top-level menu reappears when either the
    ``edit menu'' item in the SOLID EDIT menu is selected, or the
    ``RETURN'' item in the subordinate menu is selected.
    <p>The SOLID EDIT menu applies to all solids when in the SOL
    EDIT state. The items in the SOLID EDIT menu are selected by
    either using the mouse or by depressing the appropriate button
    on the button box. When any of the SOLID EDIT menu items are
    selected (e.g., ``Rotate'', ``Translate'', ``Scale''), the
    solid-specific menu disappears. Th top-level solid-specific
    menu reappears when the ``edit menu'' item in the SOLID EDIT
    menu is selected.</p>
    <p>The <i>p [params]</i> command is used to make precise
    changes, where the numeric value of the parameter being edited
    is know. Values for all parameters in the ARB8 and SOLID EDIT
    menus can be specified by using the <i>p</i> command, or by
    pointing and clicking with the mouse.</p>
    <div class="c1">
      <img src="es8-tr0.gif" alt="es8-tr0"> <b>Translating ARB8
      Point 1 to the Origin.</b>
    </div>
    <h3>Translate Operation</h3>
    <p>\noindent{\tt mged&gt; <i>Select the ``Translate'' entry in
    the solid edit menu</i> mged&gt; <i>p 0 0 0</i> mged&gt; }</p>
    <p>Point 1 of the primitive is moved to point 0 0 0, as shown
    in Figure <a href="#es8-tr0">es8-tr0</a>.</p>
    <p>The translate solid operation is selected by either picking
    ``Translate'' on the solid edit menu with the mouse, by
    depressing the solid edit button on the button box, or by
    entering the <i>press sed</i> command. Parameters to the
    translate solid operation are of the form <i>p a b c</i> where
    <i>a</i>, <i>b</i>, and <i>c</i> are the new coordinates of
    point 1 in the solid. The other points are transferred to keep
    the same position relative to point 1. The general form of the
    new coordinates for point is</p>
    <div class="c1">
      <pre>
x ' = x + a - x
y ' = y + b - y
Z ' = Z + c - Z
</pre>
    </div>
    <p>The command</p>
    <p>\noindent{\tt mged&gt; <i>p 1 -1 -1</i> mged&gt; }</p>
    <p>can be used to restore the primitive to the original
    position.</p>
    <h3>Rotate Operation</h3>
    <div class="c1">
      <img src="es8-xrot.gif" alt="es8-xrot"> <b>Solid Edit
      Rotation of 45 Degrees about X.</b>
    </div>
    <p>The rotate operation is initiated by either selecting Rotate
    on the menu screen with the mouse, by depressing the Solid
    Rotate button on the button box, or by entering the <i>press
    srot</i> command on the keyboard.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``Rotate'' entry in the
    solid edit menu</i> mged&gt; <i>p 45 0 0</i> mged&gt; }</p>
    <p>The parameter <i>p</i> command is used to make precise
    rotation changes. The command is entered in the form <i>p a b
    c</i> where <i>a</i>, <i>b</i>, and <i>c</i> are the angles (in
    degrees) of rotation about the x, y, and z axes respectively.
    Point 1, the vertex, remains fixed, and the solid is rotated
    about this point. A positive angle of rotation is
    counter-clockwise when viewed in the positive direction along
    an axis.</p>
    <p>The order of rotation is not commutative. Rotation takes
    place about the Z axis, Y axis, and X axis in that order.
    Figure <a href="#es8-xrot">es8-xrot</a> shows the rotation of
    45 degrees about the X axis.</p>
    <p>
    <!-- The following is the formula for moving point (x,y,z) through angles -->
    <!-- (a, b, c) to point (x', y', z') -->
    <!-- <PRE> -->
    <!-- [X'] [cos b cos c                     -cos b sin c        sin b        ][X] -->
    <!-- [Y']=[sin a sin b cos c +cos a sin b   cos a cos c -sin a sin b sin c -sin a cos b ][Y] -->
    <!-- [Z'] [sin a sin c -cos a sin b cos c   cos a sin b sin c + sin a cos c cos a cos b ][Z] -->
    <!-- </PRE> --></p>
    <p>The values entered after the p are absolute - the rotations
    are applied to the primitive as it existed when solid rotation
    was first selected. Thus entering <i>p 0 0 0</i> will undo any
    rotations performed since solid rotation was begun.</p>
    <div class="c1">
      <img src="es8-yrot.gif" alt="es8-yrot"> <b>Solid Edit
      Rotation of 45 Degrees about Y.</b>
    </div>
    <div class="c1">
      <img src="es8-zrot.gif" alt="es8-zrot"> <b>Solid Edit
      Rotation of 45 Degrees about Z.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>p 0 45 0</i> mged&gt; }</p>
    <p>Figure <a href="#es8-yrot">es8-yrot</a> displays the solid
    after it has been rotated about the Y axis.</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 45</i> mged&gt; }</p>
    <p>Figure <a href="#es8-zrot">es8-zrot</a> displays the solid
    after it has been rotated about the Z axis.</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 0</i> mged&gt; }</p>
    <p>This restores the original orientation of the solid.</p>
    <h3>Scale Operation</h3>
    <div class="c1">
      <img src="es8-scale.gif" alt="es8-scale"> <b>ARB8 Scale
      Increased by 2X.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Scale'' entry in the
    solid edit menu</i> mged&gt; <i>p 2</i> mged&gt; }</p>
    <p>Figure <a href="#es8-scale">es8-scale</a> corresponds to the
    view that is shown on the display. The scale operation may be
    initiated by either selecting the Scale entry on the menu with
    the mouse, by depressing the Solid Scale button, or by entering
    <i>press sscale</i> on the keyboard. The parameter command <i>p
    n</i> is used to enter a precise scale factors, where <i>n</i>
    is the scale factor. The coordinates of point 1 remain the
    same. The distances from point 1 to the other points are
    multiplied by the scale value <i>n</i>. The general equations
    for the transformation from point p to p' are</p>
    <pre>
    x'[i] = x[i] + n (x[i] - x[1] )
    y'[i] = y[i] + n (y[i] - y[1] )   i != 1
    z'[i] = z[i] + n (z[i] - z[1] )
</pre>
    <p>The size of the primitive may be changed by depressing the
    mouse at different positions. When the mouse is clicked, the
    edited primitive is scaled about point 1 (the key point) by an
    amount proportional to the distance the mouse is from the
    center of the screen. If the mouse is above the center of the
    screen, the edited primitive will become larger. If the mouse
    is below the center, the primitive will become smaller.</p>
    <p>The value of <i>n</i> entered is applied to the primitive as
    it existed when the solid scale state was entered.</p>
    <p>Entering <i>p 1</i> will return the primitive to the size it
    had when the solid scale operation first started.</p>
    <p>\noindent{\tt mged&gt; <i>p 1</i> mged&gt; }</p>
    <div class="c1">
      <img src="es8-edge1.gif" alt="es8-edge1"> <b>ARB8 Edge 15
      Moved Through (9, -2, -2).</b>
    </div>
    <div class="c1">
      <img src="es8-edge2.gif" alt="es8-edge2"> <b>ARB8 Edge 12
      Moved Through (2, 5, -2).</b>
    </div>
    <div class="c1">
      <img src="es8-edge3.gif" alt="es8-edge3"> <b>ARB8 Edge 14
      Moved Through (2, -2, 7).</b>
    </div>
    <h3>Moving Edges</h3>
    <p>The move edge command permits the moving of a line or edge
    so that the line passes through the selected point.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``edit menu'' entry in
    the solid edit menu</i> mged&gt; <i>Select the ``move edges''
    entry in the ARB menu</i> mged&gt; <i>Select the ``move edge
    15'' entry in the ARB8 edges menu</i> mged&gt; <i>p 9 -2 -2</i>
    mged&gt; }</p>
    <p>The edge 15 is moved so that it passes through the point (9,
    -2, -2). The coordinates of the new points 1 and 5 are the
    intersection of the new edge with the planes 234 and 678. Since
    both the old edge and new edge 15 are parallel to the X axis,
    the X coordinate of the point given by the <i>p</i> command has
    no meaning. The X coordinates for points 1 and 5 are not
    changed. See Figure <a href="#es8-edge1">es8-edge1</a>.</p>
    <p>\noindent{\tt mged&gt; <i>p 9 -1 -1</i> mged&gt; }</p>
    <p>This restores the original shape. The choice of ``9'' for
    the X coordinate was arbitrary.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``move edge 12'' entry
    in the ARB8 edges menu</i> mged&gt; <i>p 2 5 -2</i> mged&gt;
    }</p>
    <p>The edge 12 is parallel to the Y axis. This command moves
    the points 1 and 2 so that their X and Z coordinates are 2 and
    -2. See Figure <a href="#es8-edge2">es8-edge2</a>. The Y
    coordinates are not changed.</p>
    <p>To restore the view, enter:</p>
    <p>\noindent{\tt mged&gt; <i>p 1 5 -1</i> mged&gt; }</p>
    <p>The choice of ``5'' for the Y coordinate was arbitrary.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``move edge 14'' entry
    in the ARB8 edges menu</i> mged&gt; <i>p 2 -2 7</i> mged&gt;
    }</p>
    <p>The edge 14 is parallel to the Z axis. This command moves
    the points 1 and 4 so that their X and Y coordinates are 2 and
    -2. See Figure <a href="#es8-edge3">es8-edge3</a>. The Z
    coordinates are not changed.</p>
    <p>\noindent{\tt mged&gt; <i>p 1 -1 7</i> mged&gt; }</p>
    <p>This restores the original shape. The choice of ``7'' for
    the Z coordinate was arbitrary.</p>
    <h3>Extrude Command</h3>
    <div class="c1">
      <img src="es8-ex1.gif" alt="es8-ex1"> <b>ARB8 Rear Face
      Extruded 5 Units in -Z.</b>
    </div>
    <div class="c1">
      <img src="es8-ex2.gif" alt="es8-ex2"> <b>ARB8 Rear Face
      Extruded 3 Units in +Z.</b>
    </div>
    <p>The extrude command is used to move the opposite surface a
    distance from the specified surface or plate. This command can
    only be used when an ARB solid is in solid edit state.</p>
    <p>\noindent{\tt mged&gt; <i>extrude 1265 5</i> mged&gt; }</p>
    <p>In Figure <a href="#es8-ex1">es8-ex1</a>, the plane opposite
    surface whose points are 1, 2, 6, and 5 is moved to a distance
    of 5 in the positive Z direction from plane 1265. Note that the
    points were selected counter-clockwise when viewed in the
    positive direction along the Z axis.</p>
    <p>\noindent{\tt mged&gt; <i>extrude 1562 3</i> mged&gt; }</p>
    <p>In Figure <a href="#es8-ex2">es8-ex2</a>, the plane opposite
    surface 1562 is moved to a distance of 3 in the negative Z
    direction from 1562. Note that the points were selected
    clockwise when viewed in the positive direction along the Z
    axis.</p>
    <p>\noindent{\tt mged&gt; <i>extrude 1265 2</i> mged&gt; }</p>
    <p>This restores the original shape of this solid.</p>
    <p>To return control to the VIEWING state, select the ``REJECT
    Edit'' item on the button menu, press the ``reject'' button on
    the button box, or enter the command <i>press reject</i> on the
    keyboard. Then, enter</p>
    <p>\noindent{\tt mged&gt; <i>d arb8</i> mged&gt; }</p>
    <p>to drop the ARB8 from view.</p>
    <h2>Solid Edit: A Five-Sided Polyhedron</h2>
    <div class="c1">
      <img src="es5-top.gif" alt="es5-top"> <b>Top View of an
      ARB5.</b>
    </div>
    <div class="c1">
      <img src="es5-rot.gif" alt="es5-rot"> <b>A Rotated View of
      the ARB5.</b>
    </div>
    <div class="c1">
      <img src="es5-sed.gif" alt="es5-sed"> <b>The ARB5 in Solid
      Edit State.</b>
    </div>
    <p>This tutorial illustrates the application of the SOL EDIT
    state to the ARB5 solid. In this tutorial, the view is modified
    by using the rotation knobs so that all sides can be seen.</p>
    <p>\noindent{\tt mged&gt; <i>size 6</i> mged&gt; <i>in arb5
    arb5</i> Enter X, Y, Z for point 1: <i>0 0 0</i> Enter X, Y, Z
    for point 2: <i>0 0 1</i> Enter X, Y, Z for point 3: <i>0 1
    1</i> Enter X, Y, Z for point 4: <i>0 1 0</i> Enter X, Y, Z for
    point 5: <i>-1 .5 .5</i> mged&gt; }</p>
    <p>Figure <a href="#es5-top">es5-top</a> is the display of arb5
    in the VIEWING state that is seen when the solid is first
    created. In this view, the Z axis is perpendicular to the
    viewing screen.</p>
    <p>\noindent{\tt mged&gt; <i>Twist ROTY knob clockwise and
    restore</i> mged&gt; <i>Twist ROTX knob counter-clockwise and
    restore</i> mged&gt; }</p>
    <p>These actions generate a view shown in Figure <a href=
    "#es5-rot">es5-rot</a> that shows all sides.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``Solid Illum'' entry
    in the button menu</i> mged&gt; <i>Move the mouse out of the
    menu area</i> mged&gt; <i>Click the mouse to enter SOL EDIT
    state</i> mged&gt; }</p>
    <p>These actions will place MGED in the SOL EDIT state as shown
    in Figure <a href="#es5-sed">es5-sed</a>.</p>
    <h3>Translate Operation</h3>
    <div class="c1">
      <img src="es5-tr.gif" alt="es5-tr"> <b>Translating an
      ARB5.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Translate'' entry in
    the solid edit menu</i> mged&gt; <i>p -1 -1 1</i> mged&gt;
    }</p>
    <p>This command cause point 1 to be moved to coordinates (-1,
    -1, 1) and the other points are moved so that they keep the
    same relative position to point 1. See Figure <a href=
    "#es5-tr">es5-tr</a>.</p>
    <p>Enter this command to restore the solid to its original
    location:</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 0</i> mged&gt; }</p>
    <h3>Rotate Operation</h3>
    <div class="c1">
      <img src="es5-xrot.gif" alt="es5-xrot"> <b>ARB5 Solid Edit
      Rotation about X.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Rotate'' entry in the
    solid edit menu</i> mged&gt; <i>p 45 0 0</i> mged&gt; }</p>
    <p>Figure <a href="#es5-xrot">es5-xrot</a> shows a rotation of
    45 degrees about an axis parallel to the X axis. The rotate
    command is entered in the form <i>p a b c</i> where <i>a</i>,
    <i>b</i>, and <i>c</i> are the angles (in degrees) of rotation
    about the x, y, and z axes and intersect at point 1. All
    rotation takes place about point 1.</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 0</i> mged&gt; }</p>
    <p>This restores the original orientation of the solid.</p>
    <h3>Scale Operation</h3>
    <div class="c1">
      <img src="es5-scale.gif" alt="es5-scale"> <b>ARB5 Scale
      Increased by 2X.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Scale'' entry in the
    solid edit menu</i> mged&gt; <i>p 2</i> mged&gt; }</p>
    <p>Figure <a href="#es5-scale">es5-scale</a> shows the change
    in the primitive. Point 1 remains the same and the distances of
    the other points from point 1 is multiplied by 2.</p>
    <p>Entering <i>p 1</i> will return the primitive to the size it
    had when the solid scale operation first started.</p>
    <p>\noindent{\tt mged&gt; <i>p 1</i> mged&gt; }</p>
    <h3>Move Edge Command</h3>
    <div class="c1">
      <img src="es5-edge1.gif" alt="es5-edge1"> <b>ARB5 Edge 14
      Moved Through (1, 1, 1).</b>
    </div>
    <div class="c1">
      <img src="es5-edge2.gif" alt="es5-edge2"> <b>ARB5 Point 5
      Moved to (-1.5, 1, 1).</b>
    </div>
    <div class="c1">
      <img src="es5-edge3.gif" alt="es5-edge3"> <b>ARB5 Edge 45
      Moved Through (-1.5 1 1).</b>
    </div>
    <div class="c1">
      <img src="es5-edge4.gif" alt="es5-edge4"> <b>ARB5 Edge 12
      Moved Through (2, 1, 2).</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``edit menu'' entry in
    the solid edit menu</i> mged&gt; <i>Select the ``move edges''
    entry in the ARB menu</i> mged&gt; <i>Select the ``move edge
    14'' entry in the ARB8 edges menu</i> mged&gt; <i>p 1 1 1</i>
    mged&gt; }</p>
    <p>The edge 14 is moved so that it moves through the point (1,
    1, 1). Note that this point is the mid-point between points 1
    and 4. See Figure <a href="#es5-edge1">es5-edge1</a>.</p>
    <p>\noindent{\tt mged&gt; <i>p 0 2 0</i> mged&gt; }</p>
    <p>This restores the original shape.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``move point 5'' entry
    in the ARB5 edges menu</i> mged&gt; <i>p -1.5 1 1</i> mged&gt;
    }</p>
    <p>The point 5 is moved to location -1.5, 1, 1. See Figure
    <a href="#es5-edge2">es5-edge2</a>.</p>
    <p>\noindent{\tt mged&gt; <i>p -1 .5 .5</i> mged&gt; }</p>
    <p>will restore the original shape.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``move edge 45'' entry
    in the ARB5 edges menu</i> mged&gt; <i>p -1.5 1 1</i> mged&gt;
    }</p>
    <p>In Figure <a href="#es5-edge3">es5-edge3</a>, the edge 45 is
    moved so that it passes through the point (-1.5, 1, 1). Note
    that this point lies between the points 4 and 5.</p>
    <p>\noindent{\tt mged&gt; <i>p -1 .5 .5</i> mged&gt; }</p>
    <p>This restores the original shape.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``move edge 12'' entry
    in the ARB5 edges menu</i> mged&gt; <i>p 2 1 2</i> mged&gt;
    }</p>
    <p>In Figure <a href="#es5-edge4">es5-edge4</a>, the edge 12 is
    moved so that it passes through the point (2, 1, 2). Note that
    the coordinates correspond to point 2.</p>
    <p>The movement of the edges may yield unpredictable results
    when the edges are not parallel to one of the axes.</p>
    <p>To return control to the VIEWING state, select the ``REJECT
    Edit'' item on the button menu, press the ``reject'' button on
    the button box, or enter the command <i>press reject</i> on the
    keyboard. Then, enter</p>
    <p>\noindent{\tt mged&gt; <i>d arb5</i> mged&gt; }</p>
    <p>to drop the ARB5 from view.</p>
    <h2>Solid Edit: Alter a Cylinder</h2>
    <div class="c1">
      <img src="esc-top.gif" alt="esc-top"> <b>Top View of a
      Cylinder.</b>
    </div>
    <div class="c1">
      <img src="esc-rot.gif" alt="esc-rot"> <b>A Rotated View of
      the Cylinder.</b>
    </div>
    <div class="c1">
      <img src="esc-sed.gif" alt="esc-sed"> <b>A Cylinder in Solid
      Edit State.</b>
    </div>
    <p>This tutorial illustrates the application of the SOL EDIT
    state to cylinder solids.</p>
    <p>\noindent{\tt mged&gt; <i>size 12</i> mged&gt; <i>in cyl
    rcc</i> Enter X, Y, Z of vertex: <i>0 0 0</i> Enter X, Y, Z of
    height (H) vector: <i>2 0 0</i> Enter radius: <i>1</i> mged&gt;
    }</p>
    <p>Figure <a href="#esc-top">esc-top</a> is the display of the
    cylinder solid when viewed from the top. Since the Z axis is
    perpendicular to the viewing screen, a view of all sides cannot
    be seen.</p>
    <p>\noindent{\tt mged&gt; <i>Twist ROTY knob clockwise and
    restore</i> mged&gt; <i>Twist ROTX knob counter-clockwise and
    restore</i> mged&gt; }</p>
    <p>These actions generate a view, Figure <a href=
    "#esc-rot">esc-rot</a>, that shows all sides.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``Solid Illum'' entry
    in the button menu</i> mged&gt; <i>Move the mouse out of the
    menu area</i> mged&gt; <i>Click the mouse to enter SOL EDIT
    state</i> mged&gt; }</p>
    <p>Figure <a href="#esc-sed">esc-sed</a> is the view that
    displays the menu for the SOL EDIT state. The point V is at the
    origin (0,0,0) in this example and is in the middle of the
    circle that contains points A and B. H is the point of the
    center of the circle that contains points C and D. The
    coordinates of H are the coordinates of the vector from V to H
    and represent the relative position of H to V. Mag is the
    magnitude of these vectors and is represented by the
    formula</p>
    <div class="c1">
      <pre>
Mag = sqrt( x + y + z )
</pre>
    </div>
    <p>``H dir cos'' are the direction cosines of the vector H
    which is perpendicular to plane of the points A, B, and V. The
    coordinates of A are the coordinates of the vector from V
    through A. Mag is the magnitude of the vectors from V to A. The
    coordinates of B are the coordinates of the vectors from V
    through B. Mag is the magnitude of the vector from V to B. The
    values for c and d are the magnitudes of the vectors from the
    tip of vector H to the points C and D respectively. ``A x B dir
    cos'' represents the direction cosines of the vector ``A x
    B''.</p>
    <h3>Translate Operation</h3>
    <div class="c1">
      <img src="esc-tr.gif" alt="esc-tr"> <b>Translating Cylinder
      Vertex to (1, 1, 1).</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Translate'' entry in
    the solid edit menu</i> mged&gt; <i>p 1 1 1</i> mged&gt; }</p>
    <p>The location of the vertex point V is moved to (1, 1, 1).
    The locations of the other points relative to V remains the
    same. See Figure <a href="#esc-tr">esc-tr</a>.</p>
    <p>Move the mouse anywhere on the screen (outside the menu
    area), and click. Notice that the cylinder is moved so that V
    is placed at this location, and the coordinates of the other
    points remain the same relative to V.</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 0</i> mged&gt; }</p>
    <p>This restores the solid to the original location.</p>
    <h3>Rotate Operation</h3>
    <div class="c1">
      <img src="esc-xrot.gif" alt="esc-xrot"> <b>Solid Edit
      Rotation of 45 Degrees about X.</b>
    </div>
    <div class="c1">
      <img src="esc-yrot.gif" alt="esc-yrot"> <b>Solid Edit
      Rotation of 45 Degrees about Y.</b>
    </div>
    <div class="c1">
      <img src="esc-zrot.gif" alt="esc-zrot"> <b>Solid Edit
      Rotation of 45 Degrees about Z.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Rotate'' entry in the
    solid edit menu</i> mged&gt; <i>p 45 0 0</i> mged&gt; }</p>
    <p>When viewing in the positive X direction, the cylinder is
    rotated counter- clockwise 45 degrees about an axis through
    point V parallel to the x axis. See Figure <a href=
    "#esc-xrot">esc-xrot</a>.</p>
    <p>\noindent{\tt mged&gt; <i>p 0 45 0</i> mged&gt; }</p>
    <p>When viewing in the positive Y direction, the cylinder is
    rotated counter- clockwise 45 degrees about an axis through
    point V parallel to the Y axis. See Figure <a href=
    "#esc-yrot">esc-yrot</a>.</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 45</i> mged&gt; }</p>
    <p>When viewing in the positive Z direction, the cylinder is
    rotated counter- clockwise 45 degrees about an axis through
    point V parallel to the Z axis. See Figure <a href=
    "#esc-zrot">esc-zrot</a>.</p>
    <p>The command</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 0</i> mged&gt; }</p>
    <p>will restore the cylinder to the original orientation.</p>
    <h3>Scale Operation</h3>
    <div class="c1">
      <img src="esc-scale.gif" alt="esc-scale"> <b>Cylinder Scale
      Increased by 1.5X.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Scale'' entry in the
    solid edit menu</i> mged&gt; <i>p 1.5</i> mged&gt; }</p>
    <p>The point V remains fixed, the distance H between the two
    end-plate ellipses is multiplied by 1.5. See Figure <a href=
    "#esc-scale">esc-scale</a>.</p>
    <p>The command</p>
    <p>\noindent{\tt mged&gt; <i>p 1</i> mged&gt; }</p>
    <p>restores the original scale.</p>
    <h3>Scale H Command</h3>
    <div class="c1">
      <img src="esc-sh.gif" alt="esc-sh"> <b>Cylinder Scale H
      Vector.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``edit menu'' entry in
    the solid edit menu</i> mged&gt; <i>Select the ``scale H''
    entry in the TGC menu</i> mged&gt; <i>p 1</i> mged&gt; }</p>
    <p>The magnitude of the vector H is reduced from 2 to 1. See
    Figure <a href="#esc-sh">esc-sh</a>. The command</p>
    <p>\noindent{\tt mged&gt; <i>p 2</i> mged&gt; }</p>
    <p>will restore the original shape.</p>
    <h3>Scale A Command</h3>
    <div class="c1">
      <img src="esc-sa.gif" alt="esc-sa"> <b>Cylinder Scale A
      Vector.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``scale A'' entry in
    the TGC menu</i> mged&gt; <i>p 2</i> mged&gt; }</p>
    <p>The magnitude of the vector through point A is increased to
    2, i.e., the length of the axis of the ellipse through point A
    is set equal to p. See Figure <a href="#esc-sa">esc-sa</a>. The
    command</p>
    <p>\noindent{\tt mged&gt; <i>p 1</i> mged&gt; }</p>
    <p>will restore the original shape.</p>
    <h3>Scale B Command</h3>
    <div class="c1">
      <img src="esc-sb.gif" alt="esc-sb"> <b>Cylinder Scale B
      Vector.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``scale B'' entry in
    the TGC menu</i> mged&gt; <i>p 2</i> mged&gt; }</p>
    <p>The magnitude of the vector through point B is increased to
    2, i.e., the length of the axis of the ellipse through point B
    is set equal to p. See Figure <a href="#esc-sb">esc-sb</a>. The
    command</p>
    <p>\noindent{\tt mged&gt; <i>p 1</i> mged&gt; }</p>
    <p>will restore the original shape.</p>
    <h3>Scale C Command</h3>
    <div class="c1">
      <img src="esc-sc.gif" alt="esc-sc"> <b>Cylinder Scale C
      Vector.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``scale C'' entry in
    the TGC menu</i> mged&gt; <i>p 2</i> mged&gt; }</p>
    <p>The magnitude of the vector through point c is increased to
    the value of p. The length of the axis of the ellipse through
    point c is set equal to the value of p. See Figure <a href=
    "#esc-sc">esc-sc</a>. The command</p>
    <p>\noindent{\tt mged&gt; <i>p 1</i> mged&gt; }</p>
    <p>will restore the original shape.</p>
    <h3>Scale D Command</h3>
    <div class="c1">
      <img src="esc-sd.gif" alt="esc-sd"> <b>Cylinder Scale D
      Vector.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``scale D'' entry in
    the TGC menu</i> mged&gt; <i>p 2</i> mged&gt; }</p>
    <p>The magnitude of the vector through point D is changed to
    the value of p. The length of the axis of the ellipse through
    point D is set equal to the value of p. See Figure <a href=
    "#esc-sd">esc-sd</a>. The command</p>
    <p>\noindent{\tt mged&gt; <i>p 1</i> mged&gt; }</p>
    <p>will restore the original shape.</p>
    <p>The scale H, A, B, C, and D commands provide for setting the
    magnitude equal to the value entered by the <i>p</i> command.
    The solid edit <b>scale</b> operation provides for multiplying
    <b>all</b> the vectors by the value entered by the <i>p</i>
    command.</p>
    <h3>Move End H Command</h3>
    <div class="c1">
      <img src="esc-mh.gif" alt="esc-mh"> <b>Cylinder Move End of
      H.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``move end H'' entry in
    the TGC menu</i> mged&gt; <i>p 3</i> mged&gt; }</p>
    <p>The length of the vector H is changed to the value of p. See
    Figure <a href="#esc-mh">esc-mh</a>. The command</p>
    <p>\noindent{\tt mged&gt; <i>p 2</i> mged&gt; }</p>
    <p>will restore the original shape.</p>
    <h3>Move End H (rt) Command</h3>
    <div class="c1">
      <img src="esc-mhrt.gif" alt="esc-mhrt"> <b>Cylinder Move End
      of H \& Rotate.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``move end H(rt)''
    entry in the TGC menu</i> mged&gt; <i>p 3</i> mged&gt; }</p>
    <p>This command is similar to the ``move end H'' command except
    the vector through point A is rotated so its direction is in
    the -Y direction. See Figure <a href="#esc-mhrt">esc-mhrt</a>.
    The command</p>
    <p>\noindent{\tt mged&gt; <i>p 2</i> mged&gt; }</p>
    <p>will restore the original shape, but not the original
    orientation.</p>
    <p>To return control to the VIEWING state, select the ``REJECT
    Edit'' item on the button menu, press the ``reject'' button on
    the button box, or enter the command <i>press reject</i> on the
    keyboard. Then, enter</p>
    <p>\noindent{\tt mged&gt; <i>d cyl</i> mged&gt; }</p>
    <p>to drop the cylinder from view.</p>
    <h2>Solid Edit: Alter Ellipsoid</h2>
    <div class="c1">
      <img src="ese-top.gif" alt="ese-top"> <b>Top View of an
      Ellipsoid.</b>
    </div>
    <div class="c1">
      <img src="ese-sed.gif" alt="ese-sed"> <b>An Ellipsoid in
      Solid Edit State.</b>
    </div>
    <p>This tutorial illustrates the application of the SOL EDIT
    state to the ellipsoid primitive.</p>
    <p>\noindent{\tt mged&gt; press reset mged&gt; <i>size 6</i>
    mged&gt; <i>in ell ellg</i> Enter X, Y, Z of vertex: <i>0 0
    0</i> Enter X, Y, Z of vector A: <i>1 0 0</i> Enter X, Y, Z of
    vector B: <i>0 .3536 -0.3536</i> Enter X, Y, Z of vector C:
    <i>0 .3536 0.3536</i> mged&gt; }</p>
    <p>Figure <a href="#ese-top">ese-top</a> is the display of the
    primitive in the viewing state. Since the Z axis is
    perpendicular to the viewing screen, a view of all sides cannot
    be seen.</p>
    <p>\noindent{\tt mged&gt; <i>Twist ROTY knob clockwise and
    restore</i> mged&gt; <i>Twist ROTX knob counter-clockwise and
    restore</i> mged&gt; }</p>
    <p>These actions generate a view that shows all sides.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``Solid Illum'' entry
    in the button menu</i> mged&gt; <i>Move the mouse out of the
    menu area</i> mged&gt; <i>Click the mouse to enter SOL EDIT
    state</i> mged&gt; }</p>
    <p>The display will be changed from the VIEWING MODE through
    the SOL PICK to the SOL EDIT state. Figure <a href=
    "#ese-sed">ese-sed</a> is the view that is displayed.</p>
    <p>The coordinates of the points A, B, C, are given by the
    product of the magnitude of the vector and the cosine of X, Y,
    and Z direction cosines. In the display, the coordinates
    are:</p>
    <div class="c1">
      <pre>
A = (1, 0, 0)
B = (0, 0.3536, -0.3536)
C = (0, 0.3536,  0.3536)
</pre>
    </div>or
    <div class="c1">
      <pre>
A = ( 1* cos  0,  1* cos 90,   1* cos 90 )
B = (.5* cos 90, .5* cos 45, -.5* cos 45 )
C = (.5* cos 90, .5* cos 45,  .5* cos 45 )
</pre>
    </div>
    <h3>Translate Operation</h3>
    <div class="c1">
      <img src="ese-tr.gif" alt="ese-tr"> <b>Translating Ellipsoid
      to (-1, 1, 1).</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Translate'' entry in
    the solid edit menu</i> mged&gt; <i>p -1 1 1</i> mged&gt; }</p>
    <p>The key point V is moved to (-1, 1, 1) and the ellipsoid
    maintains its relative position to V. See Figure <a href=
    "#ese-tr">ese-tr</a>.</p>
    <p>While in the SOL EDIT state, the solid may be translated by
    using the mouse. These changes are not numerically exact, but
    they can be useful to visually position a solid with respect to
    other solids. Move the mouse to a position outside the menu
    area on the screen. Click the mouse. The center point (V) of
    the ellipsoid will be translated to that point. Note that only
    the value of the coordinates of V are changed. The command</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 0</i> mged&gt; }</p>
    <p>will restore the original position.</p>
    <h3>Rotate Operation</h3>
    <div class="c1">
      <img src="ese-xrot.gif" alt="ese-xrot"> <b>Solid Edit
      Rotation of 45 Degrees about X.</b>
    </div>
    <div class="c1">
      <img src="ese-yrot.gif" alt="ese-yrot"> <b>Solid Edit
      Rotation of 45 Degrees about Y.</b>
    </div>
    <div class="c1">
      <img src="ese-zrot.gif" alt="ese-zrot"> <b>Solid Edit
      Rotation of 45 Degrees about Z.</b>
    </div>
    <p>The rotate operation is initiated by either selecting Rotate
    on the menu screen with the mouse, by depressing the Solid
    Rotate button on the button box, or by entering the <i>press
    srot</i> command on the keyboard.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``Rotate'' entry in the
    solid edit menu</i> mged&gt; <i>p 45 0 0</i> mged&gt; }</p>
    <p>Figure <a href="#ese-xrot">ese-xrot</a> shows the rotation
    of the ellipsoid about its X axis. The angle of rotation is
    counter-clockwise when viewed in the positive X direction. The
    direction cosines of vectors VB and VC are changed by 45 .</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``Rotate'' entry in the
    solid edit menu</i> mged&gt; <i>p 0 45 0</i> mged&gt; }</p>
    <p>Figure <a href="#ese-yrot">ese-yrot</a> shows the rotation
    of the ellipsoid about its Y axis. The angle of rotation is
    counter-clockwise when viewed in the positive Y direction. The
    rotation is made from the original view, and the restoration of
    the view is not necessary.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``Rotate'' entry in the
    solid edit menu</i> mged&gt; <i>p 0 0 45</i> mged&gt; }</p>
    <p>Figure <a href="#ese-zrot">ese-zrot</a> shows the rotation
    of the ellipsoid about its Z axis. The axis of rotation is
    counter-clockwise when viewed in the positive Z direction. The
    command</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 0</i> mged&gt; }</p>
    <p>restores the original orientation of the solid.</p>
    <h3>Scale Operation</h3>
    <div class="c1">
      <img src="ese-scale.gif" alt="ese-scale"> <b>Ellipsoid Scale
      Decreased.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Scale'' entry in the
    solid edit menu</i> mged&gt; <i>p .5</i> mged&gt; }</p>
    <p>Point V is not changed, but the distance from V to the
    surface of the ellipsoid is multiplied by 0.5, because the
    magnitude of the vectors are multiplied by the value of 0.5.
    See Figure <a href="#ese-scale">ese-scale</a>.</p>
    <p>Move the mouse to a position outside the menu area and above
    the X axis, and click the mouse. Notice that the size of the
    ellipsoid has grown, i.e., the magnitude of the vectors have
    increased. Move the mouse to a position below the X axis, and
    click the mouse. Notice that the size of the ellipsoid has
    increased.</p>
    <p>The command</p>
    <p>\noindent{\tt mged&gt; <i>p 1</i> mged&gt; }</p>
    <p>will restore the original scale.</p>
    <p>NOTE: The use of the scale operation from the Solid Edit
    menu will result in the values of all the vectors being
    multiplied by the value of the scale. Use of the scale
    operation from the Ellipsoid menu with a particular vector A,
    B, or C changes the magnitude of that vector to the value of
    the scale.</p>
    <h3>Scale A Command</h3>
    <div class="c1">
      <img src="ese-sa.gif" alt="ese-sa"> <b>Ellipsoid Scale A
      Vector.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``edit menu'' entry in
    the solid edit menu</i> mged&gt; <i>Select the ``scale A''
    entry in the ellipsoid menu</i> mged&gt; <i>p 1.5</i> mged&gt;
    }</p>
    <p>The magnitude of the vector to point A is set equal to the
    value of p e.g. 1.5). The components of the vector are (1.5, 0,
    0) since the vector was parallel to the X axis. See Figure
    <a href="#ese-sa">ese-sa</a>. The command</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``scale A'' entry in
    the TGC menu</i> mged&gt; <i>p 1</i> mged&gt; }</p>
    <p>will restore the original shape.</p>
    <h3>Scale B Command</h3>
    <div class="c1">
      <img src="ese-sb.gif" alt="ese-sb"> <b>Ellipsoid Scale B
      Vector.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``scale B'' entry in
    the Ellipsoid menu</i> mged&gt; <i>p 1.5</i> mged&gt; }</p>
    <p>The magnitude of the vector to point B is set equal to the
    value of p (e.g. 1.5). The coordinates of the vector are the
    product of p and the direction cosines of B. See Figure
    <a href="#ese-sb">ese-sb</a>. The command</p>
    <p>\noindent{\tt mged&gt; <i>p 0.5</i> mged&gt; }</p>
    <p>will restore the original shape.</p>
    <h3>Scale C Command</h3>
    <div class="c1">
      <img src="ese-sc.gif" alt="ese-sc"> <b>Ellipsoid Scale C
      Vector.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``scale C'' entry in
    the Ellipsoid menu</i> mged&gt; <i>p 1.5</i> mged&gt; }</p>
    <p>The magnitude of the vector to point C is set equal to the
    value of p (i.e., 1.5). The coordinates of the vector are the
    product of p and the direction cosines of C. See Figure
    <a href="#ese-sc">ese-sc</a>. The command</p>
    <p>\noindent{\tt mged&gt; <i>p 0.5</i> mged&gt; }</p>
    <p>will restore the original shape.</p>
    <p>To return control to the VIEWING state, select the ``REJECT
    Edit'' item on the button menu, press the ``reject'' button on
    the button box, or enter the command <i>press reject</i> on the
    keyboard. Then, enter</p>
    <p>\noindent{\tt mged&gt; <i>d ell</i> mged&gt; }</p>
    <p>to drop the ellipsoid from view.</p>
    <h2>Solid Edit: Alter Torus</h2>
    <div class="c1">
      <img src="est-top.gif" alt="est-top"> <b>Top View of a
      Torus.</b>
    </div>
    <div class="c1">
      <img src="est-sed.gif" alt="est-sed"> <b>The Torus in Solid
      Edit State.</b>
    </div>
    <p>This tutorial illustrates the application of the SOL EDIT
    state to the torus solid.</p>
    <p>\noindent{\tt mged&gt; <i>size 6</i> mged&gt; <i>in tor
    tor</i> Enter X, Y, Z of vertex: <i>0 0 0</i> Enter X, Y, Z of
    normal vector: <i>0 1 0</i> Enter radius 1: <i>1</i> Enter
    radius 2: <i>0.2</i> mged&gt; }</p>
    <p>Figure <a href="#est-top">est-top</a> is the display of the
    torus solid in viewing state. Since the Z-axis is perpendicular
    to the viewing screen, a view of all sides cannot be seen.</p>
    <p>\noindent{\tt mged&gt; <i>Twist ROTY knob clockwise and
    restore</i> mged&gt; <i>Twist ROTX knob counter-clockwise and
    restore</i> mged&gt; }</p>
    <p>These actions generate a view of the torus that shows all
    sides, as shown in Figure <a href="#est-sed">est-sed</a>.</p>
    <p>\noindent{\tt mged&gt; <i>Select the ``Solid Illum'' entry
    in the button menu</i> mged&gt; <i>Move the mouse out of the
    menu area</i> mged&gt; <i>Click the mouse to enter SOL EDIT
    state</i> mged&gt; }</p>
    <p>The torus is a ring whose cross-section is a circle. The
    distance from the vertex to the center of the cross-section is
    r1 and r2 is the radius of the circular cross section.</p>
    <p>Let the points I and O be the intersection of the line x=-z
    and the torus. Then,</p>
    <div class="c1">
      <pre>
I = (-(r2-r1) cos 45, 0, (r2-r1) cos 45 )
O = (-(r2+r1) cos 45, 0, (r2+r1) cos 45 )
</pre>
    </div>
    <h3>Translate Operation</h3>
    <div class="c1">
      <img src="est-tr.gif" alt="est-tr"> <b>Translating a
      Torus.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Translate'' entry in
    the solid edit menu</i> mged&gt; <i>p -.5 -1 .5</i> mged&gt;
    }</p>
    <p>The vertex V of the torus is moved to (-.5, -1, .5). See
    figure <a href="#est-tr">est-tr</a>. The coordinates of the
    other points remain the same, relative to the vertex. The
    command</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 0</i> mged&gt; }</p>
    <p>will restore the original position.</p>
    <h3>Rotate Operation</h3>
    <div class="c1">
      <img src="est-xrot.gif" alt="est-xrot"> <b>Torus Solid Edit
      Rotation about X.</b>
    </div>
    <div class="c1">
      <img src="est-yrot.gif" alt="est-yrot"> <b>Torus Solid Edit
      Rotation about Y.</b>
    </div>
    <div class="c1">
      <img src="est-zrot.gif" alt="est-zrot"> <b>Torus Solid Edit
      Rotation about Z.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Rotate'' entry in the
    solid edit menu</i> mged&gt; <i>p 45 0 0</i> mged&gt; }</p>
    <p>The torus is rotated 45 degrees counter-clockwise about the
    positive X axis. The coordinates of the points I and H are
    transformed using the following matrix:</p>
    <pre>
    [x'] [1   0      0   ] [x]
    [y']=[0  .7071 -.7071] [y]
    [z'] [0  .7071  .7071] [z]
</pre>See Figure <a href="#est-xrot">est-xrot</a>.
    <p>\noindent{\tt mged&gt; <i>p 0 45 0</i> mged&gt; }</p>
    <p>The torus is rotated 45 degrees counter-clockwise about the
    positive Y axis. See Figure <a href=
    "#est-yrot">est-yrot</a>.</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 45</i> mged&gt; }</p>
    <p>The torus is rotated 45 degrees counter-clockwise about the
    positive Z axis. See Figure <a href="#est-zrot">est-zrot</a>.
    The original orientation is restored by entering</p>
    <p>\noindent{\tt mged&gt; <i>p 0 0 0</i> mged&gt; }</p>
    <h3>Scale Operation</h3>
    <div class="c1">
      <img src="est-scale.gif" alt="est-scale"> <b>Torus Scale
      Increased.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``Scale'' entry in the
    solid edit menu</i> mged&gt; <i>p 1.5</i> mged&gt; }</p>
    <p>The vertex remains the same and all distances from the
    vertex are multiplied by 1.5, the value entered with p. See
    Figure <a href="#est-scale">est-scale</a>. To return to the
    original scale, enter</p>
    <p>\noindent{\tt mged&gt; <i>p 1</i> mged&gt; }</p>
    <h3>Scale Radius 1 Command</h3>
    <div class="c1">
      <img src="est-sr1.gif" alt="est-sr1"> <b>Scale Torus Radius
      1.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``edit menu'' entry in
    the solid edit menu</i> mged&gt; <i>Select the ``scale radius
    1'' entry in the TORUS menu</i> mged&gt; <i>p 1.5</i> mged&gt;
    }</p>
    <p>The distance from the vertex to the center of the
    cross-section of the ring is set equal to the values given with
    <i>p</i>, e.g., 1.5. See Figure <a href="#est-sr1">est-sr1</a>.
    The original scale can be restored with</p>
    <p>\noindent{\tt mged&gt; <i>p 1</i> mged&gt; }</p>
    <h3>Scale Radius 2 Command</h3>
    <div class="c1">
      <img src="est-sr2.gif" alt="est-sr2"> <b>Scale Torus Radius
      2.</b>
    </div>
    <p>\noindent{\tt mged&gt; <i>Select the ``edit menu'' entry in
    the solid edit menu</i> mged&gt; <i>Select the ``scale radius
    2'' entry in the TORUS menu</i> mged&gt; <i>p 0.5</i> mged&gt;
    }</p>
    <p>The distance from the center of the cross-section of the
    ring is set equal to the value given with <i>p</i>, e.g. 0.5.
    This value must remain less than the value for r1. See Figure
    <a href="#est-sr2">est-sr2</a>. The command</p>
    <p>\noindent{\tt mged&gt; <i>p 0.2</i> mged&gt; }</p>
    <p>will restore the original shape.</p>
    <p>To return control to the VIEWING state, select the ``REJECT
    Edit'' item on the button menu, press the ``reject'' button on
    the button box, or enter the command <i>press reject</i> on the
    keyboard. Then, enter</p>
    <p>\noindent{\tt mged&gt; <i>d tor</i> mged&gt; }</p>
    <p>to drop the torus from view.</p>
    <h1>TUTORIALS ON OBJECT EDITING</h1>
    <h2>Object Editing a Six-Sided Polyhedron</h2>
    <p>This tutorial illustrates the application of the <b>OBJ
    EDIT</b> state to the ``arb8'' primitive. The editing of the
    arb8 illustrates the absolute movement of the points.</p>
    <div class="c1">
      <img src="eo-start.gif" alt="eo-start"> <b>``arb8'' Object
      Edit; Top View.</b>
    </div>\noindent {\tt mged&gt; <i>e arb8</i> vectorized in 0
    seconds mged&gt; <i>size 8</i> mged&gt; <i>Select the <b>BUTTON
    MENU</b> if not already displayed.</i> <i>Select the <b>Object
    Illum</b> menu entry.</i> <i>Move the mouse away from the menu
    area and select twice.</i> }
    <p>These operations select an object for editing. Control is
    passed through the <b>OBJ PICK</b> and <b>OBJ PATH</b> states
    to the <b>OBJ EDIT</b> state. The display should look similar
    to Figure <a href="#eo-start">eo-start</a>.</p>
    <h3>Scale Operation</h3>
    <div class="c1">
      <img src="eo-scale.gif" alt="eo-scale"> <b>``arb8'' Object
      Edit; Scaled by 0.5.</b>
    </div>\noindent {\tt mged&gt; <i>scale 0.5</i> mged&gt; }
    <p>As always, the selected operation operates with respect to
    the key vertex -- point 1 remains the same, and the distances
    from point 1 to the other points are multiplied by the scale
    factor. See Figure <a href="#eo-scale">eo-scale</a>. What will
    happen if another <b>scale 0.5</b> command is given? The
    <b>scale</b> operator is an absolute operator. It sets the
    scale factor associated with a particular transformation
    matrix. It does not multiply the current transformation matrix
    scale factor by the new scale factor.</p>
    <h3>X, Y, and XY Move Operation</h3>
    <div class="c1">
      <img src="eo-xyzmove.gif" alt="eo-xyzmove"> <b>``arb8''
      Object Edit; Translated to (0.5, -2, 1.5).</b>
    </div>\noindent {\tt mged&gt; <i>scale 1</i> mged&gt;
    <i>translate .5 -2 1.5</i> mged&gt; <i>Select the <b>X move</b>
    menu entry.</i> }
    <p>The first two commands undo the effects of the previous
    scale operation, and translate the key point to (0.5, -2, 1.5).
    The coordinates of the other points are changed accordingly;
    preserving their distances relative to point 1 (see Figure
    <a href="#eo-xyzmove">eo-xyzmove</a>). The last operation above
    placed MGED into a state where the key point of the object will
    track the X component of successive selects, but not the Y
    component. Note that on some displays point 1 may not be
    directly visible. It is actually behind point 4. Watch the area
    listing the information concerning ``arb8'' as selections are
    made.</p>
    <p>\noindent <i>Do several selects while moving the cursor
    slowly in a circle.</i></p>
    <p>Observe that only the X axis information changes. Similarly,
    the {\bf Y move} tracks only changes in the Y axis, and <b>XY
    move</b> tracks changes in both axes.</p>
    <div class="c1">
      <img src="eo-xymove.gif" alt="eo-xymove"> <b>XY Move.</b>
    </div>\noindent {\tt mged&gt; }<i>press 45,45</i> {\tt mged&gt;
    } <i>Do several more selects while moving the cursor slowly in
    a circle.</i>
    <p>This time, moving point 1 modifies the model x and y axes
    (observe the changes in the list of vertices). If <b>Y move</b>
    is selected, all three sets of axes are modified. These
    operators work in screen space, not model space, so using them
    with an oblique view moves the model in more than one axis
    (Figure <a href="#eo-xymove">eo-xymove</a> for example)..</p>
    <h3>Rotate Operation</h3>
    <div class="c1">
      <img src="eo-arbrot.gif" alt="eo-arbrot"> <b>``arb8'' Rotated
      by (30, 45, 60).</b>
    </div>\noindent {\tt mged&gt; <i>press reset</i> mged&gt;
    <i>translate 0 0 0</i> mged&gt; <i>rotobj 30 45 60</i> mged&gt;
    }
    <p>The primitive is rotated 60, 45, and 30 about the z, y, and
    x axes in that order as shown in Figure <a href=
    "#eo-arbrot">eo-arbrot</a>. Note that the coordinates of the
    points are changed when scaling, translation, and rotation are
    performed.</p>
    <p>\noindent {\tt mged&gt; <i>press reset</i> mged&gt; <i>d
    arb8</i> mged&gt; }</p>
    <p>If an object which is being edited is deleted from view,
    MGED transitions back into the <b>VIEWING</b> state.</p>
    <h2>Object Editing an Ellipsoid</h2>
    <div class="c1">
      <img src="eo-ellg.gif" alt="eo-ellg"> <b>Object Edit; Ellipse
      viewed from 45,45 preset.</b>
    </div>\noindent {\tt mged&gt; <i>e ellg</i> mged&gt; <i>Select
    the <b>45,45</b> button menu entry.</i> <i>Select the <b>Object
    Illum</b> button menu entry.</i> <i>Move the cursor outside the
    menu area and select twice.</i> }
    <p>Control is again passed from the <b>OBJ PICK</b> state
    through the <b>OBJ PATH</b> state to the <b>OBJ EDIT</b> state.
    When editing a cylinder, ellipsoid, or torus, the coordinates
    of the primitives are set relative to the center of the
    primitive, and are not changed by any translation of the
    primitive. Figure <a href="#eo-ellg">eo-ellg</a> represents the
    display.</p>
    <h3>Scale Operation</h3>
    <div class="c1">
      <img src="eo-ellg2x.gif" alt="eo-ellg2x"> <b>Object Edit;
      Ellipse scaled up by 2.</b>
    </div>\noindent {\tt mged&gt; <i>scale 2</i> mged&gt; }
    <p>The magnitudes of the vectors from the center V to the
    points A, B, and C are multiplied by the scale factor 2. The
    location of the center V is unchanged. See Figure <a href=
    "#eo-ellg2x">eo-ellg2x</a>.</p>
    <h3>Move Operations</h3>
    <div class="c1">
      <img src="eo-ellgxyz.gif" alt="eo-ellgxyz"> <b>Object Edit;
      Ellipse Translated.</b>
    </div>\noindent {\tt mged&gt; <i>scale 1</i> mged&gt; <i>Select
    the <b>XY move</b> button menu entry.</i> <i>Move the cursor to
    some location away from the menu area and select.</i> }
    <p>The as with the arb8 in the previous section, the ellipsoid
    is moved in the model space plane parallel to the plane of the
    screen so the key point (vertex V) is ``placed at'' the point
    corresponding to the cursor location. Note that there is no
    explicit control over the location of the point with respect to
    screen Z (depth in the viewing cube); the selected point has
    the same screen Z as the original point. The screen should look
    similar to Figure <a href="#eo-ellgxyz">eo-ellgxyz</a>.</p>
    <p>\noindent {\tt mged&gt; <i>d ellg</i> mged&gt; }</p>
    <h2>Object Path and Object Edit</h2>
    <p>This section illustrates the use of the <b>OBJ PATH</b>
    state to select the number of objects that are affected by one
    edit command. In the previous sections the user was shown how
    to manipulate only one primitive. A group of primitives may
    also be edited as a single entity. This section shows how an
    entire group may be edited without addressing each individual
    primitive.</p>
    <p>MGED generally has several ways to achieve a particular
    result. In this section, keyboard commands are used instead of
    the control buttons and the display menu. The creation and
    saving of special primitives is illustrated.</p>
    <p>In the database, the original primitives are centered around
    the origin. Copies of these primitives will be made, translated
    away from the origin and saved for future editing.</p>
    <h3>Organize the Primitives and Groups</h3>
    <div class="c1">
      <img src="eo-stacked.gif" alt="eo-stacked"> <b>Stacked
      Primitives.</b>
    </div>\noindent {\tt mged&gt; <i>cp arb8 arb8.s</i> mged&gt;
    <i>cp ellg ellg.s</i> mged&gt; <i>cp tgc tgc.s</i> mged&gt;
    <i>cp tor tor.s</i> mged&gt; }
    <p>Figure <a href="#eo-stacked">eo-stacked</a> shows the four
    primitives; arb8.s, ellg.s, tgc.s, and tor.s. One convention
    frequently used by experienced modelers is to tack an
    identifying suffix on the names of the various primitives and
    objects. Often, a ``.s'' suffix denotes a <i>solid</i>, a
    ``.r'' denotes a <i>region</i> and a ``.g'' denotes a
    <i>group</i> (note that this is a different ``.g'' from the
    ``.g'' suffix used with filenames.).</p>
    <p>\noindent {\tt mged&gt; <i>size 16</i> mged&gt; <i>sed
    arb8.s</i> mged&gt; <i>press sxy</i> mged&gt; <i>p 3 -3 1</i>
    mged&gt; <i>press accept</i> mged&gt; }</p>
    <p>Several things happened in the above sequence. The net
    result is that the solid arb8.s was ``unstacked'' using a Solid
    Edit so it is more visible. The same sequence of operations
    will be performed with the other objects to move them to other
    locations.</p>
    <div class="c1">
      <img src="eo-spread.gif" alt="eo-spread"> <b>Primitives After
      Translation.</b>
    </div>\noindent {\tt mged&gt; <i>sed ellg.s</i> mged&gt;
    <i>press sxy</i> mged&gt; <i>p -3 3 1</i> mged&gt; <i>press
    accept</i> mged&gt; <i>sed tgc.s</i> mged&gt; <i>press sxy</i>
    mged&gt; <i>p -3 -3 1</i> mged&gt; <i>press accept</i> mged&gt;
    <i>sed tor.s</i> mged&gt; <i>press sxy</i> mged&gt; <i>p 3 3
    1</i> mged&gt; <i>press accept</i> mged&gt; }
    <p>The screen should now look like Figure <a href=
    "#eo-spread">eo-spread</a>. The next step is to group the
    primitives</p>
    <p>\noindent {\tt mged&gt; <i>g a.g tgc.s arb8.s</i> mged&gt;
    <i>g b.g ellg.s tor.s</i> mged&gt; <i>g c.g a.g b.g</i>
    mged&gt; <i>B c.g</i> vectorized in 0 sec mged&gt; <i>tree
    c.g</i></p>
    <pre>
| c.g_____________| a.g_____________| tgc.s
                                    | arb8.s
                  | b.g_____________| ellg.s
                                    | tor.s
</pre>\noindent mged&gt; }
    <p>The <i>group</i> operator (<b>g</b>) generates an object,
    named by the first argument, which is the union of all objects
    named in succeeding arguments. Therefore, the object ``a.g'' is
    composed of the union of ``tgc.s'' and ``arb8.s''. Likewise,
    the object ``c.g'' is the union of ``a.g'' and ``b.g''. The
    next command in the above sequence is called the <i>blast</i>
    command. It is effectively a <i>zap</i> (<b>Z</b>) followed by
    an <i>edit</i> (<b>e</b>).</p>
    <p>The final command is the <i>tree</i> command. It is intended
    to give the user some idea of the hierarchical structure of an
    object. It presents a tree laid on its side. The root is at the
    left, and the leaves are at the right. A vertical bar denotes a
    connection at a given level, with the proviso that a vertical
    bar having a line of underscores coming in from the left
    represents the start of a particular subtree when read from top
    down (``ellg.s'' and ``arb8.s'' do not have a common
    parent).</p>
    <div class="c1">
      <img src="eo-grpath.gif" alt="eo-grpath"> <b>Object Path With
      ``tor.s'' as Reference Solid.</b>
    </div>\noindent {\tt mged&gt; <i>press oill</i> mged&gt;
    <i>Move the cursor up and down the screen until the primitive
    ``tor.s'' is illuminated, then select</i> }
    <p>Selecting the solid ``tor.s'' transitions MGED into the
    <b>OBJ PATH</b> state, and establishes ``tor.s'' as the
    reference solid for any future editing operations. Note that
    the name ``tor.s'' is shown in the upper left corner of the
    display, and on the second status line at the bottom of the
    display (Figure <a href="#eo-grpath">eo-grpath</a>).</p>
    <p>The <b>OBJ PATH</b> state has little meaning unless there is
    more than one path or group in the display. One of the
    following paths may be selected:</p>
    <p>\begin{quote} c.g/b.g/\_MATRIX\_/tor.s</p>
    <p>c.g/\_MATRIX\_/b.g/tor.s</p>
    <p>\_MATRIX\_/c.g/b.g/tor.s \end{quote}</p>
    <p>Although the torus primitive has been selected as the
    reference solid, the position of <b>\_MATRIX\_</b> determines
    the extent of the effects of the edit. The first choice affects
    only the torus. The second choice affects everything under the
    group ``b.g'' (the torus and ellipsoid). The third choice
    affects all of the primitives. Remember though, that in all
    cases, what is being edited is the Homogeneous Transformation
    Matrix (thought of as the arc connecting objects), not the
    underlying solid.</p>
    <h3>Editing One Primitive</h3>
    <div class="c1">
      <img src="eo-gredit.gif" alt="eo-gredit"> <b>Object Edit With
      ``tor.s'' as Reference Solid.</b>
    </div>\noindent <i>Move the cursor up and down until {\tt
    /c.g/b.g/\_MATRIX\_/tor.s</i> appears in the bottom status
    line, then select.}
    <p>Figure <a href="#eo-gredit">eo-gredit</a> is the new
    display. Note that the torus is illuminated. The <b>OBJ
    EDIT</b> state has been reached.</p>
    <div class="c1">
      <img src="eo-tor111.gif" alt="eo-tor111"> <b>Object Edit
      Affecting Torus Only.</b>
    </div>\noindent {\tt mged&gt; <i>translate 1 1 1</i> mged&gt; }
    <p>The key point of the torus is moved to 1, 1, 1. The other
    primitives are not moved. See Figure <a href=
    "#eo-tor111">eo-tor111</a>.</p>
    <p>\noindent {\tt mged&gt; <i>press reject</i> mged&gt; }</p>
    <h3>Editing a Group of Two Primitives</h3>
    <div class="c1">
      <img src="eo-bgrp.gif" alt="eo-bgrp"> <b>Torus and Ellipsoid
      Selected for Object Edit.</b>
    </div>\noindent {\tt mged&gt; <i>press oill</i> mged&gt;
    <i>Move the cursor up and down the screen until the primitive
    ``tor.s'' is illuminated, then select.</i> <i>Move the cursor
    up and down until {\tt /c.g/\_MATRIX\_/b.g/tor.s</i> appears in
    the bottom status line, then select.} }
    <p>Control has again been passed to the <b>OBJ EDIT</b> state.
    Notice that both the torus and ellipsoid are illuminated
    (Figure <a href="#eo-bgrp">eo-bgrp</a>. Although only the
    parameters for the torus will be changed in the display, the
    ellipsoid in group ``b.g'' will be affected by the edit.</p>
    <div class="c1">
      <img src="eo-bgrp311.gif" alt="eo-bgrp311"> <b>Torus and
      Ellipsoid Translated by (3, 1, 1).</b>
    </div>\noindent {\tt mged&gt; <i>translate 3 1 1</i> mged&gt; }
    <p>The key point of the torus is moved to 3, 1, 1. The
    ellipsoid is moved by the same amount. See Figure <a href=
    "#eo-bgrp311">eo-bgrp311</a>.</p>
    <p>\noindent {\tt mged&gt; <i>press reject</i> mged&gt; }</p>
    <h3>Editing Two Groups of Four Primitives</h3>
    <div class="c1">
      <img src="eo-cgrp.gif" alt="eo-cgrp"> <b>All Primitives
      Selected for Object Edit.</b>
    </div>\noindent {\tt mged&gt; <i>press oill</i> mged&gt;
    <i>Move the cursor up and down the screen until the primitive
    ``tor.s'' is illuminated, then select.</i> <i>Move the cursor
    up and down until {\tt /\_MATRIX\_/c.g/b.g/tor.s</i> appears in
    the bottom status line, then select.} }
    <p>Control has again been passed to the <b>OBJ EDIT</b> state.
    Notice that all of the primitives are illuminated (Figure
    <a href="#eo-cgrp">eo-cgrp</a>). Although only the parameters
    for the torus will be changed in the display, the ellipsoid in
    group ``b.g'' will be affected by the edit.</p>
    <div class="c1">
      <img src="eo-cgrp321.gif" alt="eo-cgrp321"> <b>All Primitives
      Translated by (3, 2, 1).</b>
    </div>\noindent {\tt mged&gt; <i>translate 3 2 1</i> mged&gt; }
    <p>The key point of the torus is moved to 3, 2, 1. All other
    primitives are moved by the same amount. See Figure <a href=
    "#eo-cgrp321">eo-cgrp321</a>.</p>
    <p>\noindent {\tt mged&gt; <i>press reject</i> mged&gt; }</p>
    <p>Control has now returned to the VIEWING state.</p>
    <h1>BUILDING A SET OF COORDINATE AXES</h1>
    <div class="c1">
      <img src="axis-3525.gif" alt="axis-3525"> <b>The Model Axes
      Viewed from 35,25.</b>
    </div>
    <div class="c1">
      <img src="rmit-3525.gif" alt="rmit-3525"> <b>Example Axes
      Viewed form 35,25.</b>
    </div>
    <p>MGED does not display a set of XYZ co-ordinate axes on the
    screen. When you are in the 35,25 (isometric) viewing state the
    axes are positioned as in Figure <a href=
    "#axis-3525">axis-3525</a>. This database can be found in
    cad/db/axis.g.</p>
    <p>If you would like a set of coordinate axes to assist in
    model building, the easiest thing to do is to construct three
    axes using "rcc" cylinder primitives via the "in" command;</p>
    <p>\noindent{\tt mged&gt; <i>in x rcc 0 0 0 50 0 0 1</i>
    mged&gt; <i>in y rcc 0 0 0 0 100 0 1</i> mged&gt; <i>in z rcc 0
    0 0 0 0 150 1</i> mged&gt; }</p>
    <p>with the short leg as the "x" axis, next longer leg the "y"
    axis and longest leg the "z" axis, as in Figure <a href=
    "#rmit-3525">rmit-3525</a>. Now, at any stage through
    construction of the model, the 'solid' or 'object illuminate'
    mode can be used to identify which axis cylinder is going
    where; they will have the solid names of "x", "y", and "z". The
    name of the solid will also be displayed in the top left hand
    corner of the graphics window and at the bottom of this
    window.</p>
    <p>Before going on to create a model, construct the three axes
    cylinders with the "in" commands mentioned above. Select the
    "button menu" in the upper left corner of the graphics window
    to enable the button menu, and select 35, 25 from this menu.
    Your axis will be displayed as shown in Figure <a href=
    "#rmit-3525">rmit-3525</a>.</p>
    <h1>BUILDING A TIN WOODSMAN</h1>
    <div class="c1">
      <img src="wm-prims.gif" alt="wm-prims"> <b>WoodsMan
      Primitives.</b>
    </div>The purpose of this tutorial is to demonstrate how to
    build a model using a few basic primitives. The model to be
    constructed is a tin woodsman. The four primitives used in the
    construction of the tin woodsman are an ARB8, a cylinder, an
    ellipsoid, and a torus. These four primitives will be
    duplicated several times, and each copy will be modified using
    solid editing, to obtain the required shapes. The finished
    version of this database can be found in the BRL-CAD Package
    file ``db/woodsman.g''.
    <h2>Create Primitives</h2>
    <p>\noindent{\tt \$ <i>mged woodsman.g</i> BRL-CAD Release 3.0
    Graphics Editor (MGED) Compilation 82 Thu Sep 22 08:08:39 EDT
    1988 mikel@video.br:/cad/.mged.4d2 woodsman.g: No such file or
    directory Create new database (y|n)[n]? <i>y</i> attach
    (nu|tek|tek4109|ps|plot|sgi)[nu]? <i>sgi</i> ATTACHING sgi (SGI
    4d) Untitled MGED Database (units=mm) mged&gt; <i>size 20</i>
    mged&gt; <i>title A Tin Woodsman</i> mged&gt; <i>in solid8
    rpp</i> Enter XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX: <i>-1 1 -1 1
    -1 1</i> mged&gt; <i>in torus tor</i> Enter X, Y, Z of vertex:
    <i>0 0 0</i> Enter X, Y, Z of normal vector: <i>0 1 0</i> Enter
    radius 1: <i>1</i> Enter radius 2: <i>0.2</i> mged&gt; <i>in
    ellipsoid ellg</i> Enter X, Y, Z of vertex: <i>0 0 0</i> Enter
    X, Y, Z of vector A: <i>1 0 0</i> Enter X, Y, Z of vector B:
    <i>0 0.5 0</i> Enter X, Y, Z of vector C: <i>0 0 0.5</i>
    mged&gt; <i>in cylinder rcc</i> Enter X, Y, Z of vertex: <i>0 0
    0</i> Enter X, Y, Z of height (H) vector: <i>2 0 0</i> Enter
    radius: <i>1</i> mged&gt; }</p>
    <p>At this point, the screen should look like Figure <a href=
    "#wm-prims">wm-prims</a>.</p>
    <h2>Copy Primitives and Set Up for Edit</h2>
    <p>Although eight copies of the ellipsoid and two copies of the
    cylinder shall be used in the final solid, fewer copies are
    made initially since there is replication in the editing of
    these primitives.</p>
    <p>\noindent{\tt mged&gt; <i>cp ellipsoid e.2</i> mged&gt;
    <i>cp ellipsoid e.6</i> mged&gt; <i>cp cylinder c.1</i>
    mged&gt; <i>cp solid8 s.1</i> mged&gt; <i>cp torus t.1</i>
    mged&gt; <i>Z</i> mged&gt; <i>e e.* c.1 t.1 s.1</i> vectorized
    in 0 sec mged&gt; }</p>
    <div class="c1">
      <img src="wm-hat1.gif" alt="wm-hat1"> <b>Funnel Bowl Cylinder
      After Rotation.</b>
    </div>
    <div class="c1">
      <img src="wm-hat2.gif" alt="wm-hat2"> <b>Funnel Bowl Cylinder
      After End Scaling.</b>
    </div>
    <div class="c1">
      <img src="wm-hat3.gif" alt="wm-hat3"> <b>Funnel Bowl Cylinder
      After Moving.</b>
    </div>
    <div class="c1">
      <img src="wm-tube.gif" alt="wm-tube"> <b>Funnel Tube Scaled
      and Positioned.</b>
    </div>
    <h2>Create Funnel Hat</h2>
    <p>The solid ``cylinder'' has a height vector (``H'') which is
    2mm long. This will be used to good advantage, to make the Tin
    Woodsman's funnel hat, with the bowl of the funnel being 2mm
    high, and the tube of the funnel being 2mm long. The tube of
    the funnel will point straight up the +Y axis.</p>
    <p>\noindent{\tt mged&gt; <i>sed c.1</i> mged&gt; <i>Select the
    ``Rotate'' entry in the solid edit menu</i> mged&gt; <i>p 0 45
    90</i> mged&gt; }</p>
    <p>This places the cylinder so that the lines BD and AC are at
    the outer ends of the cylinder. See Figure <a href=
    "#wm-hat1">wm-hat1</a>.</p>
    <p>Next, the cylinder is shaped to look like the top of a
    funnel. The vectors c and d are scaled.</p>
    <p>\noindent{\tt <i>Select the ``edit menu'' entry in the solid
    edit menu</i> <i>Select the ``scale c'' entry in the TGC
    menu</i> mged&gt; <i>p .1</i> <i>Select the ``scale d'' entry
    in the TGC menu</i> mged&gt; <i>p .1</i> mged&gt; }</p>
    <p>Figure <a href="#wm-hat2">wm-hat2</a> is the new shape of
    the cone. Note how the on-screen display records the new
    lengths of the ``c'' and ``d'' vectors. This cone must be moved
    to the planned locations for the top of the head.</p>
    <p>\noindent{\tt <i>Select the ``Translate'' entry in the solid
    edit menu</i> mged&gt; <i>p 0 2.2 0</i> <i>Select the ``ACCEPT
    Edit'' entry in the button menu</i> mged&gt; }</p>
    <p>The bottom of the hat is now properly shaped and positioned.
    The new version of the solid ``c.1'' has been saved in the
    model database. The editor returns to the viewing state. See
    Figure <a href="#wm-hat3">wm-hat3</a>.</p>
    <p>A copy of the saved ``c.1'' cone is made. A byproduct of the
    <i>cp</i> command is to display the new solid, as if the <i>cp
    c.1 c.2</i> command had been immediately followed by an <i>e
    c.2</i> command. This new solid will be edited to make the neck
    of the funnel, which is the top of the hat. The ``c.2'' copy of
    the cone must be scaled down to become a tube and the tube must
    be placed on top of the cone ``c.1''.</p>
    <p>\noindent{\tt mged&gt; <i>cp c.1 c.2</i> mged&gt; <i>sed
    c.2</i> <i>Select ``scale A,B'' in the TGC menu</i> mged&gt;
    <i>p 0.1</i> <i>Select ``Translate'' in the Solid Edit menu</i>
    mged&gt; <i>p 0 4.2 0</i> <i>Select ``ACCEPT Edit'' in the
    Button menu</i> mged&gt; }</p>
    <p>Figure <a href="#wm-tube">wm-tube</a> is the new shape of
    the funnel tube. The woodsman's hat is comprised of solids c.1
    and c.2.</p>
    <div class="c1">
      <img src="wm-head.gif" alt="wm-head"> <b>Head Sphere.</b>
    </div>
    <h2>Building the Head</h2>
    <p>The head of our Tin Woodsman is perfectly spherical, and
    will be located at coordinates (0, 2, 0). While it would be
    possible to duplicate the ellipsoid solid created above, and
    modify it to produce the desired sphere, since all the
    parameters of the head sphere are known, it is more economical
    simply to use the <i>in</i> command to construct it directly.
    Figure <a href="#wm-head">wm-head</a> shows the results of this
    operation.</p>
    <p>\noindent{\tt mged&gt; <i>in e.1</i> Enter solid type:
    <i>sph</i> Enter X, Y, Z of vertex: <i>0 2 0</i> Enter radius:
    <i>1</i> mged&gt; }</p>
    <div class="c1">
      <img src="wm-collar.gif" alt="wm-collar"> <b>The Woodsman's
      Collar.</b>
    </div>
    <h2>Building the Collar</h2>
    <p>The torus (primitive t.1) is used to build a collar between
    the head and the body. The ring of the collar is scaled to 0.1
    of its original size, and repositioned at the base of the head.
    The results of this step are shown in Figure <a href=
    "#wm-collar">wm-collar</a>.</p>
    <p>\noindent{\tt mged&gt; <i>sed t.1</i> <i>Select ``scale
    radius 2'' in the TORUS menu</i> mged&gt; <i>p 0.1</i>
    <i>Select ``Translate'' in the Solid Edit menu</i> mged&gt;
    <i>p 0 1 0</i> <i>Select ``ACCEPT Edit'' in the Button menu</i>
    mged&gt; }</p>
    <div class="c1">
      <img src="wm-body.gif" alt="wm-body"> <b>The Woodsman's
      Body.</b>
    </div>
    <h2>Building the Body</h2>
    <p>The ARB8 (primitive s.1) is used to build the body. The
    original height of s.1 is only 2mm; the required length of the
    body is 3mm, so the extrusion command is used to adjust the
    position of the lower (-Y) face of the solid. The result is
    shown in Figure <a href="#wm-body">wm-body</a>.</p>
    <p>\noindent{\tt mged&gt; <i>sed s.1</i> mged&gt; <i>extrude
    2367 3</i> <i>Select ``ACCEPT Edit'' in the Button menu</i>
    mged&gt; }</p>
    <div class="c1">
      <img src="wm-arm1.gif" alt="wm-arm1"> <b>An Upper Arm
      Prototype.</b>
    </div>
    <div class="c1">
      <img src="wm-arm2.gif" alt="wm-arm2"> <b>The Woodsman's
      Arms.</b>
    </div>
    <h2>Building the Arms</h2>
    <p>The ellipsoid primitive (e.2) is used to build the upper and
    lower parts of the left and right arms. The original solid
    ``e.2'' is oriented with the major axis of the ellipse oriented
    along the X axis. The arms need to have the major axis oriented
    along the Y axis, so first the solid is rotated. A more
    graceful arm is obtained by decreasing the length of the B and
    C vectors, and the resulting upper arm solid can be seen in
    Figure <a href="#wm-arm1">wm-arm1</a>.</p>
    <p>\noindent{\tt mged&gt; <i>sed e.2</i> <i>Select ``Rotate''
    in the Solid Edit menu</i> mged&gt; <i>p 0 45 90</i> <i>Select
    ``edit menu'' in the Solid Edit menu</i> <i>Select ``scale B''
    in the ELLIPSOID menu</i> mged&gt; <i>p 0.25</i> <i>Select
    ``scale C'' in the ELLIPSOID menu</i> mged&gt; <i>p 0.25</i>
    mged&gt; }</p>
    <p>This e.2 solid will now be moved into final position as the
    upper left arm. Then it will be duplicated three times to make
    the rest of the arm parts. Finally, each new arm part will be
    translated into the proper position, as seen in Figure <a href=
    "#wm-arm2">wm-arm2</a>.</p>
    <p>\noindent{\tt <i>Select ``Translate'' in the Solid Edit
    menu</i> mged&gt; <i>p -1.3 0 0</i> <i>Select ``ACCEPT Edit''
    in the Button menu -- This is the upper left arm</i> mged&gt;
    <i>cp e.2 e.3</i> mged&gt; <i>cp e.2 e.4</i> mged&gt; <i>cp e.2
    e.5</i> mged&gt; <i>sed e.3</i> <i>Select ``Translate'' in the
    Solid Edit menu</i> mged&gt; <i>p -1.3 -2 0</i> <i>Select
    ``ACCEPT Edit'' in the Button menu -- This is the lower left
    arm</i> mged&gt; <i>sed e.4</i> <i>Select ``Translate'' in the
    Solid Edit menu</i> mged&gt; <i>p 1.3 0 0</i> <i>Select
    ``ACCEPT Edit'' in the Button menu -- This is the upper right
    arm</i> mged&gt; <i>sed e.5</i> <i>Select ``Translate'' in the
    Solid Edit menu</i> mged&gt; <i>p 1.3 -2 0</i> <i>Select
    ``ACCEPT Edit'' in the Button menu -- This is the lower right
    arm</i> mged&gt; }</p>
    <div class="c1">
      <img src="wm-leg1.gif" alt="wm-leg1"> <b>The First Leg.</b>
    </div>
    <div class="c1">
      <img src="wm-final1.gif" alt="wm-final1"> <b>The Tin
      Woodsman.</b>
    </div>
    <h2>Building the Legs</h2>
    <p>The ellipsoid primitive (e.6) is used as a prototype to
    build the upper and lower parts of both legs from. The
    primitive e.6 is scaled, rotated, and translated into position
    as the upper left leg, as seen in Figure <a href=
    "#wm-leg1">wm-leg1</a>. Then, copies are made and translated to
    the remaining positions, just like the arms were.</p>
    <p>\noindent{\tt mged&gt; <i>sed e.6</i> <i>Select ``Rotate''
    in the Solid Edit menu</i> mged&gt; <i>p 0 45 90</i> <i>Select
    ``Translate'' in the Solid Edit menu</i> mged&gt; <i>p -0.5 -3
    0</i> <i>Select ``ACCEPT Edit'' in the Button menu -- This is
    the upper left leg</i> mged&gt; <i>cp e.6 e.7</i> mged&gt;
    <i>cp e.6 e.8</i> mged&gt; <i>cp e.6 e.9</i> mged&gt; <i>sed
    e.7</i> <i>Select ``Translate'' in the Solid Edit menu</i>
    mged&gt; <i>p -0.5 -5 0</i> <i>Select ``ACCEPT Edit'' in the
    Button menu -- This is the lower left leg</i> mged&gt; <i>sed
    e.8</i> <i>Select ``Translate'' in the Solid Edit menu</i>
    mged&gt; <i>p 0.5 -3 0</i> <i>Select ``ACCEPT Edit'' in the
    Button menu -- This is the upper right leg</i> mged&gt; <i>sed
    e.9</i> <i>Select ``Translate'' in the Solid Edit menu</i>
    mged&gt; <i>p 0.5 -5 0</i> <i>Select ``ACCEPT Edit'' in the
    Button menu -- This is the lower right leg</i> }</p>
    <p>Figure <a href="#wm-final1">wm-final1</a> is the view on the
    screen, the Tin Woodsman. Take a moment to use the rotation
    knobs to view the model from various angles.</p>
    <h2>Building Regions</h2>
    <p>So far, this example has concentrated on describing the
    basic shapes involved in making the Tin Woodsman, without
    concern for establishing a proper hierarchical structure. To
    illustrate this point, the various solids will be grouped by
    purpose and composition. First, a region will be constructed to
    contain the torso, and the color of ``cadet blue'' will be
    assigned:</p>
    <p>\noindent{\tt mged&gt; <i>r torso.r u s.1</i> Defaulting
    item number to 1001 Creating region id=1000, air=0, los=100,
    GIFTmaterial=1 mged&gt; <i>mater torso.r</i> Material =
    Material? (CR to skip) <i>plastic</i> Param = Parameter string?
    (CR to skip) <i>[RETURN]</i> Color = (No color specified) Color
    R G B (0..255)? (CR to skip) <i>95 159 159</i> Inherit = 0:
    lower nodes (towards leaves) override Inheritance (0|1)? (CR to
    skip) <i>[RETURN]</i> mged&gt; }</p>
    <p>Second, a region will be constructed to contain the collar,
    which will be colored red:</p>
    <p>\noindent{\tt mged&gt; <i>r collar.r u t.1</i> Defaulting
    item number to 1003 Creating region id=1002, air=0, los=100,
    GIFTmaterial=1 mged&gt; <i>mater collar.r</i> Material =
    Material? (CR to skip) <i>plastic</i> Param = Parameter string?
    (CR to skip) <i>[RETURN]</i> Color = (No color specified) Color
    R G B (0..255)? (CR to skip) <i>255 127 0</i> Inherit = 0:
    lower nodes (towards leaves) override Inheritance (0|1)? (CR to
    skip) <i>[RETURN]</i> mged&gt; }</p>
    <p>Third, a region will be constructed to contain all the
    limbs, and a flesh color will be assigned. Even though none of
    the limbs touch each other, note how they are combined with the
    UNION operation, to create a single object of uniform
    composition and color.</p>
    <p>\noindent{\tt mged&gt; <i>r limbs.r u e.2 u e.3 u e.4 u e.5
    u e.6 u e.7 u e.8 u e.9</i> Defaulting item number to 1001
    Creating region id=1000, air=0, los=100, GIFTmaterial=1
    mged&gt; <i>mater limbs.r</i> Material = Material? (CR to skip)
    <i>plastic</i> Param = Parameter string? (CR to skip)
    <i>[RETURN]</i> Color = 0 0 0 Color R G B (0..255)? (CR to
    skip) <i>255 200 160</i> Inherit = 0: lower nodes (towards
    leaves) override Inheritance (0|1)? (CR to skip)
    <i>[RETURN]</i> mged&gt; }</p>
    <p>Next, the funnel needs to be placed in a region. For the
    sake of simplicity, the funnel will be solid, rather than
    having a hollow center. Note that the interior of the funnel
    overlaps with the top of the Woodsman's head. The funnel can be
    made ``form fitting'' by subtracting out the overlap zone:</p>
    <p>\noindent{\tt mged&gt; <i>r funnel.r u c.1 - e.1 u c.2 -
    e.1</i> Defaulting item number to 1004 Creating region id=1003,
    air=0, los=100, GIFTmaterial=1 mged&gt; <i>mater funnel.r</i>
    Material = Material? (CR to skip) <i>plastic</i> Param =
    Parameter string? (CR to skip) <i>sh=100</i> Color = (No color
    specified) Color R G B (0..255)? (CR to skip) <i>35 107 142</i>
    Inherit = 0: lower nodes (towards leaves) override Inheritance
    (0|1)? (CR to skip) mged&gt; <i>l funnel.r</i> funnel.r (len 4)
    REGION id=1003 (air=0, los=100, GIFTmater=1) -- Material
    'plastic' 'sh=100' Color 35 107 142 \ \ u c.1 \ \ - e.1 \ \ u
    c.2 \ \ - e.1 mged&gt; }</p>
    <div class="c1">
      <img src="wm-hat-E.gif" alt="wm-hat-E"> <b>Evaluation of
      Funnel Hat Region.</b>
    </div>Note how the boolean expression was written. The concept
    that we need to express here is the combination of all the
    funnel parts, minus the portion of the head that overlaps with
    the inside of the funnel. The natural way to write this is
    <div class="c1">
      (c.1 union c.2) - e.1
    </div>but note that there are no grouping operations permitted
    in the <i>r</i> command. Furthermore, for historic reasons,
    union operations bind more loosely than intersection and
    subtraction, i.e., there are implied groups between union
    operations. Thus, the expression above needs to be rewritten as
    the formula:
    <div class="c1">
      (c.1 - e.1) union (c.2 - e.1)
    </div>which with the binding precedence can be expressed as:
    <div class="c1">
      c.1 - e.1 union c.2 - e.1
    </div>which is what was entered in the sequence above. To see
    the effect that this command had on the shape of ``funnel.r'',
    run these commands, the effect of which is shown in Figure
    <a href="#wm-hat-E">wm-hat-E</a>:
    <p>\noindent{\tt mged&gt; <i>Z</i> mged&gt; <i>E funnel.r</i>
    vectorized in 1 sec mged&gt; }</p>
    <p>These regions should be grouped together into a group, for
    convenience in referencing. This can be done with these
    commands:</p>
    <p>\noindent{\tt mged&gt; <i>g man.g collar.r funnel.r limbs.r
    torso.r</i> mged&gt; <i>Z</i> mged&gt; <i>e man.g</i>
    vectorized in 1 sec mged&gt; }</p>
    <p>The grouping <i>g</i> command combined the regions, the Zap
    command <i>Z</i> cleared the screen, and the edit <i>e
    man.g</i> command drew the whole object. As an exercise, run
    the database structure printing command <i>tree man.g</i> to
    obtain a simple depiction of the tree structure that has been
    created. For the final step of this example, the model will be
    ray-traced. Run the command:</p>
    <p>\noindent{\tt mged&gt; <i>rt -s128</i> rt -s50 -M -s128
    woodsman.g man.g db title: A Tin Woodsman Buffering single
    scanlines initial dynamic memory use=35152. Interpreting
    command stream in old format GETTREE: 0.01 CPU secs in 1
    elapsed secs (1\%) ...................Frame
    0................... PREP: 0.01 CPU secs in 0.01 elapsed secs
    (100\%) shooting at 13 solids in 4 regions model X(-2,2),
    Y(-6,7), Z(-2,2) Beam radius=0.078125 mm, divergence=0 mm/1mm
    SHOT: 3.73 CPU secs in 6 elapsed secs (62.1667\%) Additional
    dynamic memory used=29728. bytes 3515 solid/ray intersections:
    1005 hits + 2510 miss pruned 28.6\%: 13647 model RPP, 8197
    dups, 10740 RPP Frame 0: 16384 pixels in 3.73 sec = 4392.49
    pixels/sec Frame 0: 16384 rays in 3.73 sec = 4392.49 rays/sec
    (RTFM) Press RETURN to reattach <i>[RETURN]</i> mged&gt; }</p>
    <h1>BUILDING A ROBOT ARM</h1>
    <div class="c1">
      <img src="robot.gif" alt="robot"> <b>The RMIT Robot Arm.</b>
    </div>The model shown in Figure <a href="#robot">robot</a> will
    be described in a step by step instructions on how to build and
    display this model.
    <p>This is the MGED input file:</p>
    <pre>
in btm  box     0 0 0    0 -90 0      40 0 0   0 0 6
in btm1 box     0 -90 0  0 -61.549 0  40 0 0   0 0 6
in rad  rcc     20 -150 0   0 0 6   8
in cyl  rcc     20 -45 6    0 0 30  20
in cyl1 rcc     20 -45 0 0 0 36 15.5
in cyl2 rcc     20 -45 0 0 0 36 12.5
in hole rcc     8 -8 0   0 0 6   3
in hole1 rcc    32 -8 0  0 0 6   3
cp hole1 hole2
in gus  raw     21.5 -25.3 6  0 0 30  0 25.3 0  -3 0 0
in cnr  box     0 0 0   6 6 0   6 0 0   0 0 6
in cnr1 box     34 0 0  0 -6 0  6 0 0   0 0 6
cp cnr cnr2
cp cnr1 cnr3
in rad1 rcc     6 -6 0  0 0 6 6
in rad2 rcc     34 -6 0 0 0 6 6
in head rcc     20 -45 36 0 0 30 18
in shaft rcc    20 -45 36 0 0 -50 12.5
in han  rcc     20 -45 51 0 120 0 6
in ball sph     20 75 51  15
in cut box      20 -45 0        0 50 0  25 0 0  0 0 40
in squ box      12 -53 -14      0 16 0   16 0 0   0 0 -30
r handle u squ u shaft u han - ball
r knob u ball
r cor u cnr2 + rad1
r cor1 u cnr3 + rad2
in hole4 rcc 20 -150 0   0 0 6   3
cp hole2 hole3
r base u btm u btm1 - hole2 - hole3 - hole4 u rad - hole4
g all base handle knob
size 300
e all
</pre>
    <p>This is the MGED dialog:</p>
    <pre>
mged mark
BRL Graphics Editor (MGED) Version 2.31
  Sat Oct 17 20:33:05 PDT 1987
  mg\@godzilla:/usr/staff/mg/brlcad/mged
<br>
mark: No such file or directory
Crete new database (y/n)[n]? y
attach (nu|tek|plot|ir) [nu]? nu
ATTACHING nu (Null Display)
Untitled MGED Database (units=mm)
mged&gt; in btm box 0 0 0 0 -90 0 40 0 0 0 0 6
mged&gt; in btm1 box
Enter X, Y, Z of vertex:  0 -90 0
Enter X, Y, Z of vector H:  0 -61.549 0
Enter X, Y, Z of vector W:  50 0 0   40 0 0
Enter X, Y, Z of vector D: 0 0 6
mged&gt; in rad rcc 20 -150 0 0 0 6 8
mged&gt; in cyl rcc
Enter X, Y, Z of vertex:  20 -45 6
Enter X, Y, Z of height (H) vector: 0 0 30
Enter radius:  20
mged&gt; in cyl1 rcc 20 -45 0 0 0 36 15.5
mged&gt; in cyl2 rcc 20 -45 0 0 0 36 12.5
mged&gt; in hole rcc 8 -8 0 0 0 6 3
mged&gt; in hl ole 1 rcc 2 32 -8 0 0 0 6 2 3
mged&gt; cp hole1 hole2
mged&gt; in gus raw
Enter X, Y, Z of vertex: 21.5 -25.3 6
Enter X, Y, Z of vector H: 0 0 30
Enter X, Y, Z of vector W: 0 25.3 6
Enter X, Y, Z of vector D: -3 0 0
mged&gt; in cnr box 0 0 0 06 6 0 6 0 0 0 0 6
mged&gt; incnr1 box 34 0 0 0 -6 0 6 0 0 0 0 6
incnr1: no such command, type ? for help
mged&gt; in cnr1 box 34 0 0 0 -6 0 6 0 0 0 0 6
mged&gt; cp cnf r cnr2
mged&gt; in cp cnr1 cnr3
mged&gt; in rad1 rcc 6 -6 0 0 0 6 6
mged&gt; in rad2 rcc 34 -6 0 0 0 6 6
mged&gt; in shaft rcc 20 -45 36 0 0 30 18
mged&gt; in shaft rcc 20 -45 36 0 0 -50 12.5
mged&gt; in han rcc 20 -45 51 0 120 0 6
mged&gt; in ball sph
Enter X, Y, Z of vertex: 20 75 51
Enter radius: 15
mged&gt; in cut box 20 -45 0 0 50 0 25 0 0 0 040
Enter Z: 03  NOTE: error again
mged&gt; killall cut
mged&gt; in cut box 20 -45 0 0 50 0 25 0 0 0 0 40
mged&gt; in squ box 12 -53 -14 0 16 0 16 0 0 0 0- -30
mged&gt; r handle + squ shaft u han u ball
Defaulting item number to 1001
Creating region id=1000, air=0, los=100, GIFT material=1
mged&gt; r knob + ball
Defaulting item number to 1002
Creating region id=1001, air=0, los=100, GIFT material=1
mged&gt; r cor + cnr2 + rad1
Defaulting item number to 1003
Creating region id=1002, air=0, los=100, GIFT material=1
mged&gt; r cor1 + cnr3 + rad2
Defaulting item number to 1004
Creating region id=1003, air=0, los=100, GIFT material=1
mged&gt; mater knob plastic
Was
Parameter string? n
Override material color (y/n)[n]? y
R G B (0..255)? 255 0 0  NOTE:  This is color RED
mged&gt; mater handle plastic
mged&gt; Was
Parameter string? n
Override material color (y/n)[n]? y
R G B (0..255)? 219 147 112   NOTE:  This is color TAN
mged&gt; r base + btm u btm1 u gus cyl - cyl1 m1 - hole2 -hole3 -hole4 u rad-
hole4
mged&gt; error in number of args!   NOTE: Typing errors
mged&gt; r base + btm u btm1 - hole2 - hole3 - hole4 u rad - hole4
Defaulting item number to 1005
Creating region id=1004, air=0, los=100, GIFTmaterial=1
dir_lookup:  could not find "hole3"
skipping hole3
dir_lookup:  could not find "hole4"
skipping hole4
dir_lookup:  could not find "hole4"
skipping hole4
mged&gt; t
ball     cnr3     gus     knob/
base/     cor/     han     rad
btm     cor1/     handle     rad1
btm1     cut     head     rad2
cnr     cyl     hole     shaft
cnr1     cyl1     hole1     squ
cnr2     cyl2     hole2
mged&gt; in hole 4 rcc 20 -150 0 0 0 6 3
mged&gt; cp hole2 hole3
mged&gt; killall base NOTE:  Redo "base" region
mged&gt; r base + btm u btm1 - hole2 - hole3 - hole4 u rad - hole4
Defaulting item number to 1006
Creating region id=1005, air=0, los=100, GIFTmaterial=1
mged&gt; g all base handle knob
mged&gt; tree all
| all_________________| base_________| btm
                         | btm1
                         | hole2
                         | hole 3
                         | hole4
                         | rad
                         | hole4
                         | handle______________| squ
                                     | shaft
                                     | han
                                     | ball
                         | knob________________| ball
            | handle_______________| squ
                        | shaft
                        | han
                        | ball
            | knob_________________| ball
mged&gt; l base
base (len 9) REGION id=1005 (air=0, los=100, GIFTmater=1)--
 + btm
 u btm1
 - hole2
 - hole3
 - hole4
 u rad
 - hole4
 u handle
 u knob
mged&gt; l gus
gus:  ARB8 (ARB6)
1 (21.5000, -25.3000, 6.0000)
2 (21.5000, 0.0000, 6.0000)
3 (21.5000, 0.0000, 6.0000)
4 (21.5000, -25.3000, 36.0000)
5 (18.5000, -25.3000, 6.0000)
6 (18.5000, 0.0000, 6.0000)
7 (18.5000, 0.0000, 6.0000)
8 (18.5000, -25.3000, 36.0000)
mged&gt; l ball
ball:  ELL
V (20.0000, 75.0000, 51.0000)
A (15.0000, 0.0000, 0.0000) Mag=15.000000
A dir cos=(0.0, 90.0, 90.0), rot=0.0, fb=0.0
B (0.0000, 15.0000, 0.0000) Mag=15.000000
B dir cos=(90.0, 0.0, 90.0) rot=90.0, fb=0.0
C (0.0000, 0.0000, 15.0000) Mag=15.000000
C dir cos=(90.0, 90.0, 0.0) rot=90.0, fb=90.0
mged&gt; l knob
knob (len 1) REGION id=1001 (air=0, los=100, GIFTmater=1)--
Material "plastic"
Color 255 0 0
 + ball
mged&gt; l handle
handle (len 4) REGION id=1000 (air=0, los=100, GIFT MATER=1)--
Material "plastic" "n
Color 219 147 112
 + squ
 u shaft
 u han
 u ball
mged&gt; canter-0-75 0
mged&gt; size 300
mged&gt; tops
all/     cor1/     cyl2      hole1
cnr      cut     gus
cnr1     cyl     head
cor/     cyl1     hole
mged&gt; analyze cyl
cyl:  TGC
V (20.0000, -45.0000, 6.0000)
H (0.0000, 0.0000, 30.0000) Mag=30.000000
H dir cos=(90.0, 90.0, 0.0), rot=90.0, fb=90.0
A (-17.5032, -9.6767, 0.0000) Mag=20.000000
B (9.6767,-17.5032, 0.0000) Mag=20.000002
c=20.000000, d=20.000002
AxB dir cos=(90.0, 90.0, 0.0), rot=90.0,fb=90.0
Surface Areas:  base(AxB)=1256.6371
  top(CxD)=1256.6371 side=3769.9114
Total Surface Area=6283.1855
   Volume=37699.1132 (0.0100 gal)
mged&gt; q
</pre>
    <h1>RT MATERIAL TYPE, PROPERTIES, and COLOR</h1>
    <p>First the solids must be formed into a "region", e.g.:
    {\em\center r ball u torus u tube-hole }</p>
    <p>To change material type, properties and color use the
    "mater" command:</p>
    <p>{\tt mged&gt; <i>mater base</i> Material = Material? (CR to
    skip) <i>plastic</i> Param = Parameter string? (CR to skip)
    <i>sh=10 dl=0.2 sp=0.8 re=0.75</i> Color = (No color specified)
    Color R G B (0..255)? (CR to skip) <i>112 219 147</i> Inherit =
    0: lower nodes (towards leaves) override Inheritance (0|1)? (CR
    to skip) <i>0</i> mged&gt; }</p>
    <p>For the values in Parameter String for material ``Plastic'',
    you can enter such things as: "shinyness (sh)", "specular
    lighting fraction (sp)", "diffuse lighting fraction (di)",
    "transmission fraction (tr)", "reflection fraction (re)", and
    "refractive index (ri)". Two formulas must hold to keep the
    material ``physical'': sp + di=1.0, and tr + re=1.0.</p>
    <p>Suggested values for these properties are listed below:</p>
    <p>{\center sh=10, dl=0.2, sp=0.8, re=0.75}</p>
    <p>NOTE: Not all of these fields need to be input, you can use
    the system defaults for the rest.</p>
    <p>To display objects in different colors on the screen, each
    object must be a region with its own material properties and
    colors. All regions must be displayed on screen before a ray
    tracing can be performed (region objects can have cutouts to
    display other parts).</p>
    <p>R & G & B & COLOR 112 & 219 & 147 & aquamarine 50 & 204 &
    153 & med aquamarine 0 & 0 & 0 & black 0 & 0 & 255 & blue 95 &
    159 & 159 & cadet blue 66 & 66 & 111 & corn flower blue 107 &
    35 & 142 & dk slate blue 191 & 216 & 216 & light blue 143 & 143
    & 188 & light steel blue 50 & 50 & 204 & medium blue 127 & 0 &
    255 & medium slate blue 47 & 47 & 79 & midnight blue 35 & 35 &
    142 & navy blue 50 & 153 & 204 & sky blue 0 & 127 & 255 & slate
    blue 35 & 107 & 142 & steel blue 255 & 127 & 0 & coral 0 & 255
    & 255 & cyan 142 & 35 & 35 & firebrick 204 & 127 & 50 & gold
    219 & 219 & 112 & golden rod 234 & 234 & 173 & med goldenrod 0
    & 255 & 0 & green 47 & 79 & 47 & dark green 79 & 79 & 47 & dk
    olive green 35 & 142 & 35 & forest green 50 & 204 & 50 & lime
    green 107 & 142 & 35 & med forest green 66 & 111 & 66 & medium
    sea green 127 & 255 & 0 & med spring green 143 & 188 & 143 &
    pale green 35 & 142 & 107 & sea green 0 & 255 & 127 & spring
    green 153 & 204 & 50 & yellow green 47 & 79 & 79 & dk slate
    grey 84 & 84 & 84 & dim grey 168 & 168 & 168 & light grey</p>
    <p>R & G & B & COLOR 159 & 159 & 95 & khaki 255 & 0 & 255 &
    magenta 142 & 35 & 107 & maroon 204 & 50 & 50 & orange 219 &
    112 & 219 & orchid 153 & 50 & 204 & dark orchid 147 & 112 & 219
    & medium orchid 188 & 143 & 143 & pink 234 & 173 & 234 & plum
    255 & 0 & 0 & red 79 & 47 & 47 & indian red 219 & 112 & 147 &
    medium violet 255 & 0 & 127 & orange red 204 & 50 & 153 &
    violet red 111 & 66 & 66 & salmon 142 & 107 & 35 & sienna 219 &
    147 & 112 & tan 216 & 191 & 216 & thistle 173 & 234 & 234 &
    turquoise 112 & 147 & 219 & dk turquoise 112 & 219 & 219 & med
    turquoise 79 & 47 & 79 & violet 159 & 95 & 159 & blue violet
    216 & 216 & 191 & wheat 252 & 252 & 252 & white 255 & 255 & 0 &
    yellow 147 & 219 & 112 & green yellow</p>
    <p>material types are: plastic mirror glass texture</p>
    <p>Shinyness (i.e.: sh=16) Refractive index for: crown glass =
    1.52 Flint glass = 1.65 Rock salt = 1.54 Water = 1.33 Diamond =
    2.42</p>
    <p>Transmission fraction for a mirror: re=1.0 (tr=0)</p>
    <h1>RAYTRACING YOUR CREATION</h1>
    <p>Once you have finished creating all your solids, positioned
    them in their correct relationships to each other, formed all
    your regions (forming your finished object), created groups (if
    required), you can now do a ray- tracing of the view displayed
    on the screen.</p>
    <p>Note! If you want to display solids or objects (collection
    of solids regioned together) of different colors, each of the
    solids or objects must be separate regions so you can give them
    a specific color.</p>
    <p>The raytracing command is</p>
    <div class="c1">
      rt [-s\#]
    </div>
    <p>This command produces a color shaded image of the solids or
    objects on the display. This color shaded image will appear on
    a frame buffer display. The resolution of the image (number of
    rays) is equal to "\#" from the "-s" option. If the "-s" option
    is absent, 50x50 ray solution will be used (very course
    raytrace). The higher the "-s" option the better the
    raytracing, but it takes longer to display. Recommended optimum
    value of "-s" option for picture quality and speed of display
    is 256!. Some examples follow:</p>
    <pre>
             rt -s128
             rt
             rt -s256
</pre>
    <p>When the rt command is given the text and graphic window
    will appear, then the frame buffer starts to appear (the
    picture window). The first scanned display will be what was
    previously stored in it, it will then over write it with your
    picture; sometimes two buffer scans are displayed before
    yours.</p>
    <p>The default background color is blue with steel grey colored
    solids and objects. The terminal will beep when the scanned
    picture is finished; press return to get back to the "text and
    graphic" window.</p>
    <p>With the blue background it is sometimes hard to visualize
    the raytraced picture; two things you can do to improve the
    situation is: (a) Make separate regions for all solids and
    objects, so that you can assign a specific color to each
    region; this can be a time consuming task if you have a lot of
    solids and objects. (b) Construct as a separate region, three
    thin flat plates to form two walls with a bottom, as shown
    below; using "make name arb8", then solid editing this arb8,
    using move faces to the required thickness, then use command
    "cp" (copy command) to make two more copies which you can
    rotate to their respective relationships, then translate all
    three into the correct positions relative to each other and the
    solids and objects you are displaying.</p>
    <p>The advantage of doing this is to give the light source
    something to reflect off, giving back lighting; improving
    contrast considerably. With the three plates formed into their
    own region you can delete them from the screen with the "d"
    command, rotate your creation then re-display your plates
    (walls) with the "e" command to do another rt, the walls need
    to be deleted from the display when you rotate your objects,
    otherwise everything will rotate together.</p>
    <p>Figure</p>
    <p>A bonus of having constructed these three walls is that you
    can quickly change the material type to "mirror" so that you
    can get reflections of the three hidden faces.</p>
    <h1>CONCLUSIONS</h1>
    <p>MGED performs two basic functions: viewing and editing. The
    standard viewing capabilities of zooming, slewing, slicing, and
    rotation are available. Likewise, all the standard editing
    features are also available. The user easily traverses the
    hierarchical data structure, applying the editing functions of
    rotation, translation, and scaling to any position in the
    hierarchy. The hierarchical structure can be modified and
    regrouped and regions created and modified. Specific parameter
    editing can also be applied to the solids to produce any shape
    solid desired.</p>
    <p>For several decades, the production and modification of
    geometric models suitable for sophisticated engineering
    analysis has been a slow, labor-intensive procedure. In an
    effort to improve the response time of geometric models, the
    Ballistic Research Laboratory (BRL) has developed an
    interactive model editor for their combinatorial solid geometry
    modeling system (The BRL-CAD Package). The user interface to
    the geometry of these models is a program called the
    Multi-device Graphics Editor (MGED) that is designed to replace
    the traditional manual method for producing and modifying model
    databases. Using MGED, the geometric models are interactively
    viewed, modified, and constructed with immediate visual
    feedback at each step. When desired, the MGED editor can be
    operated without the need for explicit numerical input and
    opens a new dimension in the model building process. MGED has
    made great gains in reducing the bottleneck in the creation of
    high resolution geometric models.</p>
  </td>
</body>
</html>
